@userflow-tech/react-native 0.1.1 → 0.3.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 +154 -79
- package/app.plugin.js +19 -1
- package/babel-plugin/index.d.ts +8 -8
- package/babel-plugin/index.d.ts.map +1 -1
- package/babel-plugin/index.js +70 -15
- package/babel-plugin/index.js.map +1 -1
- package/babel-plugin.js +21 -0
- package/docs/anchoring.md +141 -13
- package/docs/deep-linking.md +83 -43
- package/docs/isolation.md +75 -0
- package/docs/theme-mapping.md +44 -15
- package/docs/troubleshooting.md +73 -43
- package/docs/webview-custom-banner-poc.md +64 -0
- package/expo-plugin/withUserflow.d.ts +3 -2
- package/expo-plugin/withUserflow.d.ts.map +1 -1
- package/expo-plugin/withUserflow.js +15 -9
- package/expo-plugin/withUserflow.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +150 -2
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/anchorChangeTicker.js +10 -0
- package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -1
- package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -12
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js +11 -47
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +50 -0
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js +145 -3
- package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/commonjs/anchors/fiber/fiberPath.js +122 -0
- package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js +60 -50
- package/lib/commonjs/anchors/fiber/findAnchorFiber.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/fiber/resolveFiberPath.js +220 -0
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js +147 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js +73 -36
- package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js +66 -0
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.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/isInstanceOnVisibleScreen.js +51 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +15 -21
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +178 -0
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/commonjs/anchors/semanticMatcher.js +303 -0
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
- package/lib/commonjs/anonymousId.js +4 -1
- package/lib/commonjs/anonymousId.js.map +1 -1
- package/lib/commonjs/authoring/ElementPickerOverlay.js +566 -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 +86 -0
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeButton.js +99 -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 +43 -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 +123 -0
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +64 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +90 -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/circle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@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 +151 -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 +395 -0
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/commonjs/authoring/hitTest.js +354 -0
- package/lib/commonjs/authoring/hitTest.js.map +1 -0
- package/lib/commonjs/authoring/hostAtPoint.js +204 -0
- package/lib/commonjs/authoring/hostAtPoint.js.map +1 -0
- package/lib/commonjs/content/BannerStepButton.js +68 -0
- package/lib/commonjs/content/BannerStepButton.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/buttonAppearance.js +16 -0
- package/lib/commonjs/content/buttonAppearance.js.map +1 -1
- package/lib/commonjs/content/resolveBannerButtonChrome.js +44 -0
- package/lib/commonjs/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/commonjs/content/resolveStepButtonChrome.js +8 -6
- package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/commonjs/content/themeColor.js +26 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deepLinking.js +4 -4
- package/lib/commonjs/deviceContext.js +158 -0
- package/lib/commonjs/deviceContext.js.map +1 -0
- package/lib/commonjs/evalJs/EvalJsHost.js +244 -0
- package/lib/commonjs/evalJs/EvalJsHost.js.map +1 -0
- package/lib/commonjs/evalJs/bootstrap.js +84 -0
- package/lib/commonjs/evalJs/bootstrap.js.map +1 -0
- package/lib/commonjs/evalJs/bridgeMessages.js +143 -0
- package/lib/commonjs/evalJs/bridgeMessages.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsBridge.js +31 -0
- package/lib/commonjs/evalJs/evalJsBridge.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsController.js +124 -0
- package/lib/commonjs/evalJs/evalJsController.js.map +1 -0
- package/lib/commonjs/evalJs/getWebView.js +81 -0
- package/lib/commonjs/evalJs/getWebView.js.map +1 -0
- package/lib/commonjs/evalJs/injectEvalPending.js +19 -0
- package/lib/commonjs/evalJs/injectEvalPending.js.map +1 -0
- package/lib/commonjs/evalJs/types.js +2 -0
- package/lib/commonjs/evalJs/types.js.map +1 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js +40 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/commonjs/expo-router/index.js +19 -0
- package/lib/commonjs/expo-router/index.js.map +1 -1
- package/lib/commonjs/expo-router/redirectSystemPath.js +75 -0
- package/lib/commonjs/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +42 -6
- 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 +214 -26
- 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 +22 -10
- 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/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/commonjs/pairing/PairingController.js +272 -27
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +250 -84
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/commonjs/pairing/deepLink.js +22 -5
- package/lib/commonjs/pairing/deepLink.js.map +1 -1
- package/lib/commonjs/pairing/deviceId.js +47 -0
- package/lib/commonjs/pairing/deviceId.js.map +1 -0
- package/lib/commonjs/pairing/diagnostics.js +14 -4
- 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 +72 -9
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +5 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/pairing/usePreviewBarHold.js +139 -0
- package/lib/commonjs/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/commonjs/runtime/BannerHost.js +96 -0
- package/lib/commonjs/runtime/BannerHost.js.map +1 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js +99 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js.map +1 -0
- 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/SdkErrorBoundary.js +61 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/commonjs/runtime/TargetPressBridge.js +27 -51
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowOverlay.js +97 -0
- package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -0
- package/lib/commonjs/runtime/UserflowProvider.js +154 -30
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/bannerEngine.js +63 -0
- package/lib/commonjs/runtime/bannerEngine.js.map +1 -0
- package/lib/commonjs/runtime/bannerEngineContext.js +11 -0
- package/lib/commonjs/runtime/bannerEngineContext.js.map +1 -0
- package/lib/commonjs/runtime/bannerPlacement.js +37 -0
- package/lib/commonjs/runtime/bannerPlacement.js.map +1 -0
- package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
- package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js +30 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +78 -4
- 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/isolateCall.js +48 -0
- package/lib/commonjs/runtime/isolateCall.js.map +1 -0
- package/lib/commonjs/runtime/reportSdkError.js +19 -0
- package/lib/commonjs/runtime/reportSdkError.js.map +1 -0
- package/lib/commonjs/runtime/useBannerSession.js +37 -0
- package/lib/commonjs/runtime/useBannerSession.js.map +1 -0
- package/lib/commonjs/runtime/useFlowSessionState.js +2 -1
- package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
- package/lib/commonjs/screenTracker.js +72 -5
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/surfaces/BannerBar.js +160 -0
- package/lib/commonjs/surfaces/BannerBar.js.map +1 -0
- package/lib/commonjs/surfaces/BannerSurface.js +78 -0
- package/lib/commonjs/surfaces/BannerSurface.js.map +1 -0
- 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/MadeWithUserflow.js +12 -8
- package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js +51 -35
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +383 -88
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/bannerBarLayout.js +88 -0
- package/lib/commonjs/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js +42 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +277 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js +46 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js +26 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +41 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +74 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js +152 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +148 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js +13 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js +49 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js +83 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/commonjs/surfaces/cardTransition.js +70 -0
- package/lib/commonjs/surfaces/cardTransition.js.map +1 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js +22 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.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/safeArea.js +23 -0
- package/lib/commonjs/surfaces/safeArea.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 +151 -2
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/anchorChangeTicker.js +10 -0
- package/lib/module/anchors/anchorChangeTicker.js.map +1 -1
- package/lib/module/anchors/elementConditionEvaluator.js +25 -12
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRoot.js +2 -43
- package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRootStore.js +46 -0
- package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -0
- package/lib/module/anchors/fiber/fiberInternals.js +139 -3
- package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/module/anchors/fiber/fiberPath.js +118 -0
- package/lib/module/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js +60 -50
- package/lib/module/anchors/fiber/findAnchorFiber.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/fiber/resolveFiberPath.js +215 -0
- package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/visibleRect.js +139 -0
- package/lib/module/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/module/anchors/fiber/visibleScreens.js +73 -37
- package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/module/anchors/fiber/walkVisibleFibers.js +61 -0
- package/lib/module/anchors/fiber/walkVisibleFibers.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/isInstanceOnVisibleScreen.js +46 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +15 -21
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveAutoAnchorHost.js +174 -0
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/module/anchors/semanticMatcher.js +297 -0
- package/lib/module/anchors/semanticMatcher.js.map +1 -0
- package/lib/module/anonymousId.js +4 -2
- package/lib/module/anonymousId.js.map +1 -1
- package/lib/module/authoring/ElementPickerOverlay.js +561 -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 +81 -0
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeButton.js +94 -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 +37 -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 +117 -0
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js +59 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js +85 -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/circle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@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 +147 -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 +381 -0
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/module/authoring/hitTest.js +346 -0
- package/lib/module/authoring/hitTest.js.map +1 -0
- package/lib/module/authoring/hostAtPoint.js +199 -0
- package/lib/module/authoring/hostAtPoint.js.map +1 -0
- package/lib/module/content/BannerStepButton.js +63 -0
- package/lib/module/content/BannerStepButton.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/buttonAppearance.js +14 -0
- package/lib/module/content/buttonAppearance.js.map +1 -1
- package/lib/module/content/resolveBannerButtonChrome.js +41 -0
- package/lib/module/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/module/content/resolveStepButtonChrome.js +8 -6
- package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/module/content/themeColor.js +24 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deepLinking.js +4 -4
- package/lib/module/deviceContext.js +142 -0
- package/lib/module/deviceContext.js.map +1 -0
- package/lib/module/evalJs/EvalJsHost.js +239 -0
- package/lib/module/evalJs/EvalJsHost.js.map +1 -0
- package/lib/module/evalJs/bootstrap.js +76 -0
- package/lib/module/evalJs/bootstrap.js.map +1 -0
- package/lib/module/evalJs/bridgeMessages.js +139 -0
- package/lib/module/evalJs/bridgeMessages.js.map +1 -0
- package/lib/module/evalJs/evalJsBridge.js +25 -0
- package/lib/module/evalJs/evalJsBridge.js.map +1 -0
- package/lib/module/evalJs/evalJsController.js +119 -0
- package/lib/module/evalJs/evalJsController.js.map +1 -0
- package/lib/module/evalJs/getWebView.js +76 -0
- package/lib/module/evalJs/getWebView.js.map +1 -0
- package/lib/module/evalJs/injectEvalPending.js +15 -0
- package/lib/module/evalJs/injectEvalPending.js.map +1 -0
- package/lib/module/evalJs/types.js +2 -0
- package/lib/module/evalJs/types.js.map +1 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js +35 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/module/expo-router/index.js +1 -0
- package/lib/module/expo-router/index.js.map +1 -1
- package/lib/module/expo-router/redirectSystemPath.js +70 -0
- package/lib/module/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +44 -8
- 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 +211 -29
- 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 +23 -11
- 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/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/module/pairing/PairingController.js +273 -28
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +250 -85
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/module/pairing/deepLink.js +21 -5
- package/lib/module/pairing/deepLink.js.map +1 -1
- package/lib/module/pairing/deviceId.js +41 -0
- package/lib/module/pairing/deviceId.js.map +1 -0
- package/lib/module/pairing/diagnostics.js +13 -4
- 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 +71 -9
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +5 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/pairing/usePreviewBarHold.js +134 -0
- package/lib/module/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/module/runtime/BannerHost.js +92 -0
- package/lib/module/runtime/BannerHost.js.map +1 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js +94 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js.map +1 -0
- 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/SdkErrorBoundary.js +55 -0
- package/lib/module/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/module/runtime/TargetPressBridge.js +27 -51
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowOverlay.js +92 -0
- package/lib/module/runtime/UserflowOverlay.js.map +1 -0
- package/lib/module/runtime/UserflowProvider.js +155 -31
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/bannerEngine.js +55 -0
- package/lib/module/runtime/bannerEngine.js.map +1 -0
- package/lib/module/runtime/bannerEngineContext.js +7 -0
- package/lib/module/runtime/bannerEngineContext.js.map +1 -0
- package/lib/module/runtime/bannerPlacement.js +30 -0
- package/lib/module/runtime/bannerPlacement.js.map +1 -0
- package/lib/module/runtime/changedTouchPoints.js +43 -0
- package/lib/module/runtime/changedTouchPoints.js.map +1 -0
- package/lib/module/runtime/embedBannerRegistry.js +24 -0
- package/lib/module/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +75 -4
- 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/isolateCall.js +43 -0
- package/lib/module/runtime/isolateCall.js.map +1 -0
- package/lib/module/runtime/reportSdkError.js +15 -0
- package/lib/module/runtime/reportSdkError.js.map +1 -0
- package/lib/module/runtime/useBannerSession.js +33 -0
- package/lib/module/runtime/useBannerSession.js.map +1 -0
- package/lib/module/runtime/useFlowSessionState.js +2 -1
- package/lib/module/runtime/useFlowSessionState.js.map +1 -1
- package/lib/module/screenTracker.js +67 -5
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/surfaces/BannerBar.js +155 -0
- package/lib/module/surfaces/BannerBar.js.map +1 -0
- package/lib/module/surfaces/BannerSurface.js +72 -0
- package/lib/module/surfaces/BannerSurface.js.map +1 -0
- 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/MadeWithUserflow.js +11 -7
- package/lib/module/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/module/surfaces/ModalSurface.js +53 -37
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +385 -91
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/bannerBarLayout.js +69 -0
- package/lib/module/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/module/surfaces/bannerBarTokens.js +37 -0
- package/lib/module/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +272 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js +42 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js +19 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +35 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +69 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js +148 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +143 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js +9 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js +42 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js +79 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/module/surfaces/cardTransition.js +64 -0
- package/lib/module/surfaces/cardTransition.js.map +1 -0
- package/lib/module/surfaces/resolveBannerTheme.js +16 -0
- package/lib/module/surfaces/resolveBannerTheme.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/safeArea.js +22 -0
- package/lib/module/surfaces/safeArea.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 +40 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +14 -10
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +42 -1
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.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/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.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/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +5 -5
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +50 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts +1 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +8 -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 +24 -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 +33 -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 +31 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +142 -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 +58 -0
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +81 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +75 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.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/buttonAppearance.d.ts +4 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +7 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/types.d.ts +1 -0
- package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/deepLinking.d.ts +4 -4
- 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/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- 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 +69 -3
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts +10 -1
- 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/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +78 -4
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +14 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +8 -2
- 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 +16 -2
- 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/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- 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/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- 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/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +15 -7
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts.map +1 -0
- 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/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +25 -1
- 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/isolateCall.d.ts +20 -0
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts.map +1 -0
- 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 +26 -4
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -0
- 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 +10 -6
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +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/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- 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/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.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/safeArea.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.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 +40 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +2 -0
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +14 -10
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +42 -1
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.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/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.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/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +5 -5
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +50 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/module/src/anonymousId.d.ts +1 -0
- package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +8 -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 +24 -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 +33 -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 +31 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +142 -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 +58 -0
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +81 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts +75 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/module/src/content/BannerStepButton.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/buttonAppearance.d.ts +4 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/module/src/content/themeColor.d.ts +7 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/module/src/content/types.d.ts +1 -0
- package/lib/typescript/module/src/content/types.d.ts.map +1 -1
- package/lib/typescript/module/src/deepLinking.d.ts +4 -4
- 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/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/module/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- 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 +69 -3
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/lifecycle.d.ts +10 -1
- 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/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PairingController.d.ts +78 -4
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +14 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/module/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +8 -2
- 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 +16 -2
- 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/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- 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/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- 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/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +15 -7
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts.map +1 -0
- 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/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts +25 -1
- 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/isolateCall.d.ts +20 -0
- package/lib/typescript/module/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts.map +1 -0
- 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 +26 -4
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -0
- 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 +10 -6
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +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/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- 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/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.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/safeArea.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/safeArea.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 +24 -17
- package/src/anchors/AutoAnchorRegistry.ts +169 -2
- package/src/anchors/anchorChangeTicker.ts +10 -0
- package/src/anchors/elementConditionEvaluator.ts +29 -16
- package/src/anchors/fiber/FiberScanRoot.tsx +2 -50
- package/src/anchors/fiber/FiberScanRootStore.ts +51 -0
- package/src/anchors/fiber/fiberInternals.ts +166 -3
- package/src/anchors/fiber/fiberPath.ts +117 -0
- package/src/anchors/fiber/findAnchorFiber.ts +57 -47
- package/src/anchors/fiber/indexHostFibers.ts +136 -0
- package/src/anchors/fiber/readHostContent.ts +146 -0
- package/src/anchors/fiber/resolveFiberPath.ts +215 -0
- package/src/anchors/fiber/visibleRect.ts +153 -0
- package/src/anchors/fiber/visibleScreens.ts +74 -36
- package/src/anchors/fiber/walkVisibleFibers.ts +65 -0
- package/src/anchors/fiberAnchorCache.ts +45 -0
- package/src/anchors/isInstanceOnVisibleScreen.ts +55 -0
- package/src/anchors/resolveAnchorHost.ts +23 -23
- package/src/anchors/resolveAutoAnchorHost.ts +182 -0
- package/src/anchors/semanticMatcher.ts +385 -0
- package/src/anonymousId.ts +2 -1
- package/src/authoring/ElementPickerOverlay.tsx +662 -0
- package/src/authoring/capturePickerScreenshot.ts +90 -0
- package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
- package/src/authoring/chrome/ChromeBottomSheet.tsx +110 -0
- package/src/authoring/chrome/ChromeButton.tsx +108 -0
- package/src/authoring/chrome/ChromeDialog.tsx +121 -0
- package/src/authoring/chrome/ChromeIcon.tsx +49 -0
- package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
- package/src/authoring/chrome/ChromeTopBar.tsx +150 -0
- package/src/authoring/chrome/DoubleTapBridge.tsx +67 -0
- package/src/authoring/chrome/doubleTapMonitor.ts +90 -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/circle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@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 +111 -0
- package/src/authoring/doubleTap.ts +27 -0
- package/src/authoring/elementPickerController.ts +133 -0
- package/src/authoring/fingerprintFromInstance.ts +318 -0
- package/src/authoring/hitTest.ts +441 -0
- package/src/authoring/hostAtPoint.ts +247 -0
- package/src/content/BannerStepButton.tsx +91 -0
- package/src/content/RichContentRenderer.tsx +22 -1
- package/src/content/StepButton.tsx +17 -2
- package/src/content/buttonAppearance.ts +16 -0
- package/src/content/resolveBannerButtonChrome.ts +49 -0
- package/src/content/resolveStepButtonChrome.ts +12 -6
- package/src/content/themeColor.ts +25 -0
- package/src/content/types.ts +1 -0
- package/src/deepLinking.ts +4 -4
- package/src/deviceContext.ts +168 -0
- package/src/evalJs/EvalJsHost.tsx +255 -0
- package/src/evalJs/bootstrap.ts +83 -0
- package/src/evalJs/bridgeMessages.ts +134 -0
- package/src/evalJs/evalJsBridge.ts +42 -0
- package/src/evalJs/evalJsController.ts +127 -0
- package/src/evalJs/getWebView.ts +124 -0
- package/src/evalJs/injectEvalPending.ts +14 -0
- package/src/evalJs/types.ts +56 -0
- package/src/evalJs/useEvalJsWebViewInjection.ts +37 -0
- package/src/expo-router/index.ts +8 -0
- package/src/expo-router/redirectSystemPath.ts +86 -0
- package/src/expo-router/useUserflowExpoRouter.ts +49 -6
- package/src/hostAppVersion.ts +258 -0
- package/src/index.ts +255 -27
- package/src/lifecycle.ts +12 -1
- package/src/navigation/WithUserflowReactNavigation.tsx +26 -7
- package/src/navigation/isOverlayPresentation.ts +76 -0
- package/src/navigation/openFlowNavigateUrl.ts +12 -5
- package/src/pairing/PairingController.ts +311 -28
- package/src/pairing/PreviewModeBanner.tsx +307 -94
- package/src/pairing/deepLink.ts +23 -5
- package/src/pairing/deviceId.ts +43 -0
- package/src/pairing/diagnostics.ts +14 -4
- package/src/pairing/elementPickerRelay.ts +100 -0
- package/src/pairing/resolvePreviewChrome.ts +57 -0
- package/src/pairing/tokenStorage.ts +91 -9
- package/src/pairing/usePairingState.ts +4 -0
- package/src/pairing/usePreviewBarHold.ts +160 -0
- package/src/runtime/BannerHost.tsx +102 -0
- package/src/runtime/EmbedBannerPlaceholder.tsx +115 -0
- package/src/runtime/FlowRenderer.tsx +55 -27
- package/src/runtime/FlowSurfaceFade.tsx +51 -30
- package/src/runtime/SdkErrorBoundary.tsx +77 -0
- package/src/runtime/TargetPressBridge.tsx +29 -40
- package/src/runtime/UserflowOverlay.tsx +118 -0
- package/src/runtime/UserflowProvider.tsx +162 -24
- package/src/runtime/bannerEngine.ts +55 -0
- package/src/runtime/bannerEngineContext.ts +5 -0
- package/src/runtime/bannerPlacement.ts +36 -0
- package/src/runtime/changedTouchPoints.ts +34 -0
- package/src/runtime/embedBannerRegistry.ts +28 -0
- package/src/runtime/flowEngine.ts +78 -3
- package/src/runtime/flowSessionViewState.ts +42 -4
- package/src/runtime/isolateCall.ts +53 -0
- package/src/runtime/reportSdkError.ts +12 -0
- package/src/runtime/useBannerSession.ts +35 -0
- package/src/runtime/useFlowSessionState.ts +2 -0
- package/src/screenTracker.ts +73 -5
- package/src/surfaces/BannerBar.tsx +176 -0
- package/src/surfaces/BannerSurface.tsx +82 -0
- package/src/surfaces/CardFade.tsx +18 -0
- package/src/surfaces/CloseButton.tsx +17 -7
- package/src/surfaces/MadeWithUserflow.tsx +15 -10
- package/src/surfaces/ModalSurface.tsx +49 -36
- package/src/surfaces/TooltipSurface.tsx +423 -87
- package/src/surfaces/bannerBarLayout.ts +74 -0
- package/src/surfaces/bannerBarTokens.ts +34 -0
- package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +312 -0
- package/src/surfaces/bannerWebView/bannerAutoRunEvalJs.ts +44 -0
- package/src/surfaces/bannerWebView/bannerAutoRunSession.ts +19 -0
- package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +38 -0
- package/src/surfaces/bannerWebView/bannerThemeStyles.ts +91 -0
- package/src/surfaces/bannerWebView/bannerWebFrameCss.ts +145 -0
- package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +178 -0
- package/src/surfaces/bannerWebView/buttonClassName.ts +15 -0
- package/src/surfaces/bannerWebView/resolveCdnHost.ts +47 -0
- package/src/surfaces/bannerWebView/richContentDocToHtml.ts +99 -0
- package/src/surfaces/cardTransition.ts +67 -0
- package/src/surfaces/resolveBannerTheme.ts +18 -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/safeArea.ts +29 -0
- package/src/surfaces/surfaceInteractionConfig.ts +25 -0
- package/src/surfaces/surfaceLayoutInsets.tsx +135 -0
- package/src/surfaces/themeChrome.ts +5 -3
- package/src/surfaces/tooltip/TooltipBubble.tsx +154 -19
- package/src/surfaces/tooltip/TooltipCutout.tsx +106 -49
- package/src/surfaces/tooltip/TooltipHighlight.tsx +144 -0
- package/src/surfaces/tooltip/computeTooltipPosition.ts +98 -12
- package/src/surfaces/tooltip/inferTooltipPlacement.ts +107 -18
- package/src/surfaces/tooltip/placementDiagnostics.ts +70 -0
- package/src/surfaces/tooltip/rect.ts +11 -0
- package/src/surfaces/tooltip/resolveSideCardWidth.ts +121 -0
- package/src/version.ts +1 -1
- package/vendor/core/dist/attributes.d.ts +1 -2
- package/vendor/core/dist/attributes.d.ts.map +1 -1
- package/vendor/core/dist/attributes.js +4 -4
- package/vendor/core/dist/attributes.js.map +1 -1
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts +73 -0
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js +236 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -0
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +109 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.js +417 -17
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +82 -3
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +122 -11
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +33 -5
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +107 -24
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/engine/conditionOperators.d.ts +16 -0
- package/vendor/core/dist/engine/conditionOperators.d.ts.map +1 -0
- package/vendor/core/dist/engine/conditionOperators.js +168 -0
- package/vendor/core/dist/engine/conditionOperators.js.map +1 -0
- package/vendor/core/dist/engine/handleActions.d.ts +43 -6
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +145 -15
- package/vendor/core/dist/engine/handleActions.js.map +1 -1
- package/vendor/core/dist/engine/simpleObservable.d.ts +13 -0
- package/vendor/core/dist/engine/simpleObservable.d.ts.map +1 -0
- package/vendor/core/dist/engine/simpleObservable.js +29 -0
- package/vendor/core/dist/engine/simpleObservable.js.map +1 -0
- package/vendor/core/dist/engine/trackCondition.d.ts +27 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackCondition.js +179 -0
- package/vendor/core/dist/engine/trackCondition.js.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +31 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.js +75 -0
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
- package/vendor/core/dist/errors.d.ts +11 -1
- package/vendor/core/dist/errors.d.ts.map +1 -1
- package/vendor/core/dist/errors.js +2 -1
- package/vendor/core/dist/errors.js.map +1 -1
- package/vendor/core/dist/eventAttributes.d.ts.map +1 -1
- package/vendor/core/dist/eventAttributes.js +4 -2
- package/vendor/core/dist/eventAttributes.js.map +1 -1
- package/vendor/core/dist/index.d.ts +7 -3
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +3 -1
- package/vendor/core/dist/index.js.map +1 -1
- package/vendor/core/dist/normalizeAttributes.d.ts +8 -0
- package/vendor/core/dist/normalizeAttributes.d.ts.map +1 -0
- package/vendor/core/dist/normalizeAttributes.js +129 -0
- package/vendor/core/dist/normalizeAttributes.js.map +1 -0
- package/vendor/core/dist/transport/pairing.d.ts +5 -0
- package/vendor/core/dist/transport/pairing.d.ts.map +1 -1
- package/vendor/core/dist/transport/pairing.js +69 -2
- package/vendor/core/dist/transport/pairing.js.map +1 -1
- package/vendor/core/dist/transport/phoenix.d.ts +19 -6
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +75 -7
- package/vendor/core/dist/transport/phoenix.js.map +1 -1
- package/vendor/core/dist/types.d.ts +26 -1
- package/vendor/core/dist/types.d.ts.map +1 -1
- package/vendor/core/dist/version.d.ts +1 -1
- package/vendor/core/dist/version.js +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/dist/attributes.d.ts +43 -0
- package/vendor/protocol/dist/attributes.d.ts.map +1 -0
- package/vendor/protocol/dist/attributes.js +15 -0
- package/vendor/protocol/dist/attributes.js.map +1 -0
- package/vendor/protocol/dist/autoData.d.ts +10 -17
- package/vendor/protocol/dist/autoData.d.ts.map +1 -1
- package/vendor/protocol/dist/autoData.js +2 -2
- package/vendor/protocol/dist/autoData.js.map +1 -1
- package/vendor/protocol/dist/events.d.ts +8 -0
- package/vendor/protocol/dist/events.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.d.ts +124 -6
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.js +70 -5
- package/vendor/protocol/dist/flows.js.map +1 -1
- package/vendor/protocol/dist/index.d.ts +1 -0
- package/vendor/protocol/dist/index.d.ts.map +1 -1
- package/vendor/protocol/dist/index.js +1 -0
- package/vendor/protocol/dist/index.js.map +1 -1
- package/vendor/protocol/dist/messages.d.ts +46 -15
- package/vendor/protocol/dist/messages.d.ts.map +1 -1
- package/vendor/protocol/dist/messages.js +9 -2
- package/vendor/protocol/dist/messages.js.map +1 -1
- package/vendor/protocol/dist/pairing.d.ts +26 -0
- package/vendor/protocol/dist/pairing.d.ts.map +1 -1
- package/vendor/protocol/dist/pairing.js.map +1 -1
- package/vendor/protocol/package.json +1 -1
|
@@ -3,68 +3,189 @@
|
|
|
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 {
|
|
7
|
-
import {
|
|
8
|
-
import { usePairingState } from "../pairing/usePairingState.js";
|
|
6
|
+
import { DoubleTapBridge } from "../authoring/chrome/DoubleTapBridge.js";
|
|
7
|
+
import { elementPickerController } from "../authoring/elementPickerController.js";
|
|
9
8
|
import { ABSOLUTE_FILL } from "../surfaces/absoluteFill.js";
|
|
10
|
-
import {
|
|
9
|
+
import { getSafeAreaInsetsContext, useUserflowSafeAreaInsets } from "../surfaces/safeArea.js";
|
|
10
|
+
import { SurfaceLayoutInsetsProvider } from "../surfaces/surfaceLayoutInsets.js";
|
|
11
|
+
import { BannerHost } from "./BannerHost.js";
|
|
12
|
+
import { SdkErrorBoundary } from "./SdkErrorBoundary.js";
|
|
11
13
|
import { TargetPressBridge } from "./TargetPressBridge.js";
|
|
14
|
+
import { UserflowOverlay } from "./UserflowOverlay.js";
|
|
15
|
+
import { getBannerSessionEngine } from "./bannerEngine.js";
|
|
16
|
+
import { BannerEngineContext } from "./bannerEngineContext.js";
|
|
17
|
+
import { bannerEdge } from "./bannerPlacement.js";
|
|
12
18
|
import { getFlowSessionEngine } from "./flowEngine.js";
|
|
19
|
+
import { isolateSync } from "./isolateCall.js";
|
|
20
|
+
import { useBannerSession } from "./useBannerSession.js";
|
|
13
21
|
import { getUserflowCore } from "./userflowCore.js";
|
|
14
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
23
|
const UserflowContext = /*#__PURE__*/React.createContext(null);
|
|
24
|
+
function overlayResetKeyFromEngine(engine) {
|
|
25
|
+
const session = engine.getFlowSession();
|
|
26
|
+
if (!session) {
|
|
27
|
+
return '';
|
|
28
|
+
}
|
|
29
|
+
// `ForceGoToStep` updates displayedStepId without rewriting session.currentStep.
|
|
30
|
+
return `${session.id}:${engine.getCurrentStep()?.id ?? ''}`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Session/step identity for retrying a crashed overlay. Lives in an effect so a
|
|
35
|
+
* throw cannot unmount host children (session hooks run inside the overlay
|
|
36
|
+
* boundary instead).
|
|
37
|
+
*/
|
|
38
|
+
function useOverlayErrorBoundaryResetKey(engine) {
|
|
39
|
+
const [resetKey, setResetKey] = React.useState(() => {
|
|
40
|
+
try {
|
|
41
|
+
return overlayResetKeyFromEngine(engine);
|
|
42
|
+
} catch {
|
|
43
|
+
return '';
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
const apply = next => {
|
|
48
|
+
setResetKey(next);
|
|
49
|
+
};
|
|
50
|
+
isolateSync('overlay-reset-key', () => {
|
|
51
|
+
apply(overlayResetKeyFromEngine(engine));
|
|
52
|
+
});
|
|
53
|
+
return engine.on(() => {
|
|
54
|
+
isolateSync('overlay-reset-key', () => {
|
|
55
|
+
apply(overlayResetKeyFromEngine(engine));
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}, [engine]);
|
|
59
|
+
return resetKey;
|
|
60
|
+
}
|
|
61
|
+
|
|
16
62
|
/**
|
|
17
63
|
* Mount once at the application root, above the navigation container
|
|
18
64
|
* (for example the root `_layout.tsx` or `App` component), after
|
|
19
65
|
* calling {@link Userflow.init}.
|
|
20
66
|
*
|
|
21
67
|
* Children render normally. An absolute overlay sits above them with
|
|
22
|
-
* `pointerEvents="box-none"` so taps pass through except where flow UI
|
|
68
|
+
* `pointerEvents="box-none"` so taps pass through except where flow UI blocks
|
|
69
|
+
* them (modals always; tooltips when interaction blocking is enabled).
|
|
23
70
|
* We deliberately do not use RN `<Modal>` — it is the wrong primitive for
|
|
24
71
|
* non-modal tooltips (WS6).
|
|
25
72
|
*
|
|
73
|
+
* Overlay render errors are contained by {@link SdkErrorBoundary}; host
|
|
74
|
+
* children are never inside that boundary. See
|
|
75
|
+
* `packages/react-native/docs/isolation.md`.
|
|
76
|
+
*
|
|
26
77
|
* **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
|
|
78
|
+
* `@userflow-tech/react-native/expo-router` under this provider so pathname and
|
|
79
|
+
* navigation-state changes and path-like NAVIGATE actions are wired. The tracker
|
|
80
|
+
* is a separate entry so apps without `expo-router` are not forced to install
|
|
81
|
+
* that peer.
|
|
30
82
|
*
|
|
31
83
|
* **React Navigation:** wrap `NavigationContainer` with
|
|
32
84
|
* {@link WithUserflowReactNavigation} from `@userflow-tech/react-native/navigation`.
|
|
33
85
|
*/
|
|
34
86
|
export function UserflowProvider({
|
|
35
87
|
children,
|
|
36
|
-
engine: engineProp
|
|
88
|
+
engine: engineProp,
|
|
89
|
+
bannerEngine: bannerEngineProp
|
|
37
90
|
}) {
|
|
38
91
|
const engine = engineProp ?? getFlowSessionEngine(getUserflowCore());
|
|
92
|
+
const bannerEngine = bannerEngineProp ?? getBannerSessionEngine(getUserflowCore());
|
|
39
93
|
const contextValue = React.useMemo(() => ({
|
|
40
94
|
engine
|
|
41
95
|
}), [engine]);
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
|
|
96
|
+
const overlayResetKey = useOverlayErrorBoundaryResetKey(engine);
|
|
97
|
+
const [trapHostAccessibility, setTrapHostAccessibility] = React.useState(false);
|
|
98
|
+
const onTrapChange = React.useCallback(trap => {
|
|
99
|
+
setTrapHostAccessibility(trap);
|
|
100
|
+
}, []);
|
|
101
|
+
const onOverlayError = React.useCallback(() => {
|
|
102
|
+
setTrapHostAccessibility(false);
|
|
45
103
|
}, []);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
104
|
+
const bannerSession = useBannerSession(bannerEngine);
|
|
105
|
+
const safeInsets = useUserflowSafeAreaInsets();
|
|
106
|
+
const [pickerActive, setPickerActive] = React.useState(() => elementPickerController.getState().active);
|
|
107
|
+
React.useEffect(() => {
|
|
108
|
+
return elementPickerController.subscribe(next => {
|
|
109
|
+
setPickerActive(next.active);
|
|
110
|
+
});
|
|
111
|
+
}, []);
|
|
112
|
+
const banner = bannerSession?.version.banner ?? null;
|
|
113
|
+
const flowEdge = banner && banner.overlay === false && !pickerActive ? bannerEdge(banner.embedMode) : null;
|
|
114
|
+
const hostInsets = flowEdge === 'top' || flowEdge === 'bottom' ? {
|
|
115
|
+
...safeInsets,
|
|
116
|
+
top: flowEdge === 'top' ? 0 : safeInsets.top,
|
|
117
|
+
bottom: flowEdge === 'bottom' ? 0 : safeInsets.bottom
|
|
118
|
+
} : null;
|
|
119
|
+
const appContent = /*#__PURE__*/_jsx(View, {
|
|
120
|
+
style: styles.appContent,
|
|
121
|
+
testID: "userflow-app-content",
|
|
122
|
+
importantForAccessibility: trapHostAccessibility ? 'no-hide-descendants' : undefined,
|
|
123
|
+
accessibilityElementsHidden: trapHostAccessibility ? true : undefined,
|
|
124
|
+
children: /*#__PURE__*/_jsx(TargetPressBridge, {
|
|
125
|
+
children: /*#__PURE__*/_jsx(FiberScanRoot, {
|
|
126
|
+
children: children
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
return /*#__PURE__*/_jsx(BannerEngineContext.Provider, {
|
|
131
|
+
value: bannerEngine,
|
|
132
|
+
children: /*#__PURE__*/_jsx(UserflowContext.Provider, {
|
|
133
|
+
value: contextValue,
|
|
134
|
+
children: /*#__PURE__*/_jsx(SurfaceLayoutInsetsProvider, {
|
|
135
|
+
children: /*#__PURE__*/_jsx(DoubleTapBridge, {
|
|
136
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
137
|
+
style: styles.root,
|
|
138
|
+
collapsable: false,
|
|
139
|
+
testID: "userflow-root",
|
|
140
|
+
children: [/*#__PURE__*/_jsx(BannerHost, {
|
|
141
|
+
engine: bannerEngine,
|
|
142
|
+
placement: "flow",
|
|
143
|
+
edge: "top",
|
|
144
|
+
hidden: pickerActive
|
|
145
|
+
}), /*#__PURE__*/_jsx(HostSafeArea, {
|
|
146
|
+
insets: hostInsets,
|
|
147
|
+
children: appContent
|
|
148
|
+
}), /*#__PURE__*/_jsx(BannerHost, {
|
|
149
|
+
engine: bannerEngine,
|
|
150
|
+
placement: "flow",
|
|
151
|
+
edge: "bottom",
|
|
152
|
+
hidden: pickerActive
|
|
153
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
154
|
+
style: styles.overlay,
|
|
155
|
+
pointerEvents: "box-none",
|
|
156
|
+
children: /*#__PURE__*/_jsx(SdkErrorBoundary, {
|
|
157
|
+
scope: "overlay",
|
|
158
|
+
resetKey: overlayResetKey,
|
|
159
|
+
onError: onOverlayError,
|
|
160
|
+
children: /*#__PURE__*/_jsx(UserflowOverlay, {
|
|
161
|
+
engine: engine,
|
|
162
|
+
bannerEngine: bannerEngine,
|
|
163
|
+
onTrapChange: onTrapChange
|
|
164
|
+
})
|
|
165
|
+
})
|
|
166
|
+
})]
|
|
167
|
+
})
|
|
54
168
|
})
|
|
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
|
-
})]
|
|
169
|
+
})
|
|
65
170
|
})
|
|
66
171
|
});
|
|
67
172
|
}
|
|
173
|
+
function HostSafeArea({
|
|
174
|
+
insets,
|
|
175
|
+
children
|
|
176
|
+
}) {
|
|
177
|
+
const Context = getSafeAreaInsetsContext();
|
|
178
|
+
const defaultInsets = useUserflowSafeAreaInsets();
|
|
179
|
+
if (!Context) {
|
|
180
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
181
|
+
children: children
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
return /*#__PURE__*/_jsx(Context.Provider, {
|
|
185
|
+
value: insets ?? defaultInsets,
|
|
186
|
+
children: children
|
|
187
|
+
});
|
|
188
|
+
}
|
|
68
189
|
|
|
69
190
|
/** Access the flow session engine from inside {@link UserflowProvider}. */
|
|
70
191
|
export function useUserflow() {
|
|
@@ -78,6 +199,9 @@ const styles = StyleSheet.create({
|
|
|
78
199
|
root: {
|
|
79
200
|
flex: 1
|
|
80
201
|
},
|
|
202
|
+
appContent: {
|
|
203
|
+
flex: 1
|
|
204
|
+
},
|
|
81
205
|
overlay: {
|
|
82
206
|
...ABSOLUTE_FILL
|
|
83
207
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","FiberScanRoot","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","FiberScanRoot","DoubleTapBridge","elementPickerController","ABSOLUTE_FILL","getSafeAreaInsetsContext","useUserflowSafeAreaInsets","SurfaceLayoutInsetsProvider","BannerHost","SdkErrorBoundary","TargetPressBridge","UserflowOverlay","getBannerSessionEngine","BannerEngineContext","bannerEdge","getFlowSessionEngine","isolateSync","useBannerSession","getUserflowCore","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","UserflowContext","createContext","overlayResetKeyFromEngine","engine","session","getFlowSession","id","getCurrentStep","useOverlayErrorBoundaryResetKey","resetKey","setResetKey","useState","useEffect","apply","next","on","UserflowProvider","children","engineProp","bannerEngine","bannerEngineProp","contextValue","useMemo","overlayResetKey","trapHostAccessibility","setTrapHostAccessibility","onTrapChange","useCallback","trap","onOverlayError","bannerSession","safeInsets","pickerActive","setPickerActive","getState","active","subscribe","banner","version","flowEdge","overlay","embedMode","hostInsets","top","bottom","appContent","style","styles","testID","importantForAccessibility","undefined","accessibilityElementsHidden","Provider","value","root","collapsable","placement","edge","hidden","HostSafeArea","insets","pointerEvents","scope","onError","Context","defaultInsets","useUserflow","ctx","useContext","Error","create","flex"],"sourceRoot":"../../../src","sources":["runtime/UserflowProvider.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { BannerSessionEngine } from '@userflow-tech/core';
|
|
4
|
+
import { evalJsController } from "../evalJs/evalJsController.js";
|
|
5
|
+
import { openFlowNavigateUrl } from "../navigation/openFlowNavigateUrl.js";
|
|
6
|
+
import { getFlowSessionEngine } from "./flowEngine.js";
|
|
7
|
+
import { isolateAsync } from "./isolateCall.js";
|
|
8
|
+
let bannerEngine = null;
|
|
9
|
+
|
|
10
|
+
/** Build (once) the module-level banner session engine over a {@link UserflowCore} transport. */
|
|
11
|
+
export function getBannerSessionEngine(core) {
|
|
12
|
+
if (!bannerEngine) {
|
|
13
|
+
bannerEngine = new BannerSessionEngine({
|
|
14
|
+
transport: {
|
|
15
|
+
send: message => core.send(message),
|
|
16
|
+
onServerMessage: handler => core.onServerMessage(handler),
|
|
17
|
+
setBannerSessionId: id => core.setBannerSessionId(id)
|
|
18
|
+
},
|
|
19
|
+
flowActions: () => getFlowSessionEngine(core),
|
|
20
|
+
onOpenExternalUrl: url => {
|
|
21
|
+
void isolateAsync('navigate', () => openFlowNavigateUrl(url), {
|
|
22
|
+
rethrowHostContract: false
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
onEvalJs: request => {
|
|
26
|
+
evalJsController.enqueue(request);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return bannerEngine;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Subscribe the engine to inbound server messages. Call after identify. */
|
|
34
|
+
export function attachBannerSessionEngine(core) {
|
|
35
|
+
const engine = getBannerSessionEngine(core);
|
|
36
|
+
engine.attach();
|
|
37
|
+
return engine;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Clear the banner session and detach. Call from {@link Userflow.reset}. */
|
|
41
|
+
export function resetBannerSessionEngine() {
|
|
42
|
+
bannerEngine?.reset();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Drop the local banner without detaching (preview exit, user switch). */
|
|
46
|
+
export function clearBannerSessionEngineLocalSession() {
|
|
47
|
+
bannerEngine?.clearLocalSession();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Test helper: drop the singleton so the next get recreates it. */
|
|
51
|
+
export function __resetBannerSessionEngineForTests() {
|
|
52
|
+
bannerEngine?.reset();
|
|
53
|
+
bannerEngine = null;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=bannerEngine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BannerSessionEngine","evalJsController","openFlowNavigateUrl","getFlowSessionEngine","isolateAsync","bannerEngine","getBannerSessionEngine","core","transport","send","message","onServerMessage","handler","setBannerSessionId","id","flowActions","onOpenExternalUrl","url","rethrowHostContract","onEvalJs","request","enqueue","attachBannerSessionEngine","engine","attach","resetBannerSessionEngine","reset","clearBannerSessionEngineLocalSession","clearLocalSession","__resetBannerSessionEngineForTests"],"sourceRoot":"../../../src","sources":["runtime/bannerEngine.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAA2B,qBAAqB;AAE5E,SAASC,gBAAgB,QAAQ,+BAA4B;AAC7D,SAASC,mBAAmB,QAAQ,sCAAmC;AAEvE,SAASC,oBAAoB,QAAQ,iBAAc;AACnD,SAASC,YAAY,QAAQ,kBAAe;AAE5C,IAAIC,YAAwC,GAAG,IAAI;;AAEnD;AACA,OAAO,SAASC,sBAAsBA,CAACC,IAAkB,EAAuB;EAC9E,IAAI,CAACF,YAAY,EAAE;IACjBA,YAAY,GAAG,IAAIL,mBAAmB,CAAC;MACrCQ,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,kBAAkB,EAAGC,EAAE,IAAKP,IAAI,CAACM,kBAAkB,CAACC,EAAE;MACxD,CAAC;MACDC,WAAW,EAAEA,CAAA,KAAMZ,oBAAoB,CAACI,IAAI,CAAC;MAC7CS,iBAAiB,EAAGC,GAAG,IAAK;QAC1B,KAAKb,YAAY,CAAC,UAAU,EAAE,MAAMF,mBAAmB,CAACe,GAAG,CAAC,EAAE;UAC5DC,mBAAmB,EAAE;QACvB,CAAC,CAAC;MACJ,CAAC;MACDC,QAAQ,EAAGC,OAAO,IAAK;QACrBnB,gBAAgB,CAACoB,OAAO,CAACD,OAAO,CAAC;MACnC;IACF,CAAC,CAAC;EACJ;EACA,OAAOf,YAAY;AACrB;;AAEA;AACA,OAAO,SAASiB,yBAAyBA,CAACf,IAAkB,EAAuB;EACjF,MAAMgB,MAAM,GAAGjB,sBAAsB,CAACC,IAAI,CAAC;EAC3CgB,MAAM,CAACC,MAAM,CAAC,CAAC;EACf,OAAOD,MAAM;AACf;;AAEA;AACA,OAAO,SAASE,wBAAwBA,CAAA,EAAS;EAC/CpB,YAAY,EAAEqB,KAAK,CAAC,CAAC;AACvB;;AAEA;AACA,OAAO,SAASC,oCAAoCA,CAAA,EAAS;EAC3DtB,YAAY,EAAEuB,iBAAiB,CAAC,CAAC;AACnC;;AAEA;AACA,OAAO,SAASC,kCAAkCA,CAAA,EAAS;EACzDxB,YAAY,EAAEqB,KAAK,CAAC,CAAC;EACrBrB,YAAY,GAAG,IAAI;AACrB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","BannerEngineContext","createContext"],"sourceRoot":"../../../src","sources":["runtime/bannerEngineContext.ts"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;;AAE9B;AACA,OAAO,MAAMC,mBAAmB,gBAAGD,KAAK,CAACE,aAAa,CAA6B,IAAI,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { resolveManualAnchorId } from "../anchors/resolveManualAnchorId.js";
|
|
4
|
+
const warned = new Set();
|
|
5
|
+
|
|
6
|
+
/** Body-first is the top edge; body-last is the bottom. Element modes use a placeholder. */
|
|
7
|
+
export function bannerEdge(mode) {
|
|
8
|
+
if (mode === 'BODY_FIRST') return 'top';
|
|
9
|
+
if (mode === 'BODY_LAST') return 'bottom';
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Id of the {@link EmbedBannerPlaceholder} an element-mode banner fills.
|
|
15
|
+
* Manual selectors use `#welcome-banner` or `welcome-banner`. Body modes
|
|
16
|
+
* return null so a top/bottom bar never occupies a host slot.
|
|
17
|
+
*/
|
|
18
|
+
export function embedBannerPlaceholderId(banner) {
|
|
19
|
+
if (bannerEdge(banner.embedMode)) return null;
|
|
20
|
+
return resolveManualAnchorId(banner.embedSelector?.css);
|
|
21
|
+
}
|
|
22
|
+
export function warnBannerOnce(key, message, warn = console.warn) {
|
|
23
|
+
if (warned.has(key)) return;
|
|
24
|
+
warned.add(key);
|
|
25
|
+
warn(message);
|
|
26
|
+
}
|
|
27
|
+
export function resetBannerWarningsForTests() {
|
|
28
|
+
warned.clear();
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=bannerPlacement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveManualAnchorId","warned","Set","bannerEdge","mode","embedBannerPlaceholderId","banner","embedMode","embedSelector","css","warnBannerOnce","key","message","warn","console","has","add","resetBannerWarningsForTests","clear"],"sourceRoot":"../../../src","sources":["runtime/bannerPlacement.ts"],"mappings":";;AAEA,SAASA,qBAAqB,QAAQ,qCAAkC;AAExE,MAAMC,MAAM,GAAG,IAAIC,GAAG,CAAS,CAAC;;AAEhC;AACA,OAAO,SAASC,UAAUA,CAACC,IAA8B,EAA2B;EAClF,IAAIA,IAAI,KAAK,YAAY,EAAE,OAAO,KAAK;EACvC,IAAIA,IAAI,KAAK,WAAW,EAAE,OAAO,QAAQ;EACzC,OAAO,IAAI;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAACC,MAAsB,EAAiB;EAC9E,IAAIH,UAAU,CAACG,MAAM,CAACC,SAAS,CAAC,EAAE,OAAO,IAAI;EAC7C,OAAOP,qBAAqB,CAACM,MAAM,CAACE,aAAa,EAAEC,GAAG,CAAC;AACzD;AAEA,OAAO,SAASC,cAAcA,CAC5BC,GAAW,EACXC,OAAe,EACfC,IAA+B,GAAGC,OAAO,CAACD,IAAI,EACxC;EACN,IAAIZ,MAAM,CAACc,GAAG,CAACJ,GAAG,CAAC,EAAE;EACrBV,MAAM,CAACe,GAAG,CAACL,GAAG,CAAC;EACfE,IAAI,CAACD,OAAO,CAAC;AACf;AAEA,OAAO,SAASK,2BAA2BA,CAAA,EAAS;EAClDhB,MAAM,CAACiB,KAAK,CAAC,CAAC;AAChB","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":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { warnBannerOnce } from "./bannerPlacement.js";
|
|
4
|
+
const counts = new Map();
|
|
5
|
+
|
|
6
|
+
/** Record a mounted {@link EmbedBannerPlaceholder}. Returns the unregister function. */
|
|
7
|
+
export function registerEmbedBannerPlaceholder(id) {
|
|
8
|
+
const next = (counts.get(id) ?? 0) + 1;
|
|
9
|
+
counts.set(id, next);
|
|
10
|
+
if (next > 1) {
|
|
11
|
+
warnBannerOnce(`embed-banner-dup:${id}`, `Userflow: more than one EmbedBannerPlaceholder uses id "${id}"`);
|
|
12
|
+
}
|
|
13
|
+
return () => {
|
|
14
|
+
const current = counts.get(id) ?? 0;
|
|
15
|
+
if (current <= 1) counts.delete(id);else counts.set(id, current - 1);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export function hasEmbedBannerPlaceholder(id) {
|
|
19
|
+
return (counts.get(id) ?? 0) > 0;
|
|
20
|
+
}
|
|
21
|
+
export function resetEmbedBannerPlaceholdersForTests() {
|
|
22
|
+
counts.clear();
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=embedBannerRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["warnBannerOnce","counts","Map","registerEmbedBannerPlaceholder","id","next","get","set","current","delete","hasEmbedBannerPlaceholder","resetEmbedBannerPlaceholdersForTests","clear"],"sourceRoot":"../../../src","sources":["runtime/embedBannerRegistry.ts"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,sBAAmB;AAElD,MAAMC,MAAM,GAAG,IAAIC,GAAG,CAAiB,CAAC;;AAExC;AACA,OAAO,SAASC,8BAA8BA,CAACC,EAAU,EAAc;EACrE,MAAMC,IAAI,GAAG,CAACJ,MAAM,CAACK,GAAG,CAACF,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;EACtCH,MAAM,CAACM,GAAG,CAACH,EAAE,EAAEC,IAAI,CAAC;EACpB,IAAIA,IAAI,GAAG,CAAC,EAAE;IACZL,cAAc,CACZ,oBAAoBI,EAAE,EAAE,EACxB,2DAA2DA,EAAE,GAC/D,CAAC;EACH;EACA,OAAO,MAAM;IACX,MAAMI,OAAO,GAAGP,MAAM,CAACK,GAAG,CAACF,EAAE,CAAC,IAAI,CAAC;IACnC,IAAII,OAAO,IAAI,CAAC,EAAEP,MAAM,CAACQ,MAAM,CAACL,EAAE,CAAC,CAAC,KAC/BH,MAAM,CAACM,GAAG,CAACH,EAAE,EAAEI,OAAO,GAAG,CAAC,CAAC;EAClC,CAAC;AACH;AAEA,OAAO,SAASE,yBAAyBA,CAACN,EAAU,EAAW;EAC7D,OAAO,CAACH,MAAM,CAACK,GAAG,CAACF,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;AAClC;AAEA,OAAO,SAASO,oCAAoCA,CAAA,EAAS;EAC3DV,MAAM,CAACW,KAAK,CAAC,CAAC;AAChB","ignoreList":[]}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { FlowSessionEngine } from '@userflow-tech/core';
|
|
4
|
+
import { evalJsController } from "../evalJs/evalJsController.js";
|
|
4
5
|
import { openFlowNavigateUrl } from "../navigation/openFlowNavigateUrl.js";
|
|
6
|
+
import { isolateAsync } from "./isolateCall.js";
|
|
5
7
|
let flowEngine = null;
|
|
8
|
+
/** Exit asked to end a draft that identify has not delivered yet. */
|
|
9
|
+
let endDraftOnArrival = false;
|
|
10
|
+
let unsubscribeDraftArrival = null;
|
|
6
11
|
|
|
7
12
|
/** Build (once) the module-level flow session engine over a {@link UserflowCore} transport. */
|
|
8
13
|
export function getFlowSessionEngine(core) {
|
|
@@ -14,9 +19,17 @@ export function getFlowSessionEngine(core) {
|
|
|
14
19
|
setFlowSessionId: id => core.setFlowSessionId(id)
|
|
15
20
|
},
|
|
16
21
|
onOpenExternalUrl: url => {
|
|
17
|
-
void openFlowNavigateUrl(url)
|
|
18
|
-
|
|
22
|
+
void isolateAsync('navigate', () => openFlowNavigateUrl(url), {
|
|
23
|
+
rethrowHostContract: false
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
onEvalJs: request => {
|
|
27
|
+
evalJsController.enqueue(request);
|
|
28
|
+
},
|
|
29
|
+
updateUser: attributes => core.updateUser(attributes),
|
|
30
|
+
updateGroup: (attributes, options) => core.updateGroup(attributes, options)
|
|
19
31
|
});
|
|
32
|
+
if (endDraftOnArrival) watchForRestoredDraft();
|
|
20
33
|
}
|
|
21
34
|
return flowEngine;
|
|
22
35
|
}
|
|
@@ -41,13 +54,71 @@ export function clearFlowSessionEngineLocalSession() {
|
|
|
41
54
|
flowEngine?.clearLocalSession();
|
|
42
55
|
}
|
|
43
56
|
|
|
44
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Whether a mid-flow session is held (live, draft, or suppressed by Temporarily
|
|
59
|
+
* Hide). Foreground idle uses this so a hidden session keeps the socket that
|
|
60
|
+
* can deliver the attribute update which shows it again.
|
|
61
|
+
*/
|
|
45
62
|
export function hasActiveFlowSession() {
|
|
46
|
-
return flowEngine?.
|
|
63
|
+
return flowEngine?.hasHeldFlowSession() === true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* End the current flow on the server if it is a Builder preview draft. The
|
|
68
|
+
* server restores every active draft on identify, so clearing it locally is
|
|
69
|
+
* not enough to keep it from returning on the next launch.
|
|
70
|
+
*
|
|
71
|
+
* A draft Temporarily Hide is suppressing is still ended. `getFlowSession()`
|
|
72
|
+
* hides it, but the server will send it again. When exit runs before identify
|
|
73
|
+
* has delivered the draft, the next draft session is ended when it arrives.
|
|
74
|
+
* {@link cancelPendingDraftEnd} drops that wait; a new preview must call it
|
|
75
|
+
* so the preview's own draft is not ended.
|
|
76
|
+
*/
|
|
77
|
+
export async function endDraftFlowSession() {
|
|
78
|
+
const session = flowEngine?.getHeldFlowSession();
|
|
79
|
+
if (flowEngine && session?.draftMode) {
|
|
80
|
+
cancelPendingDraftEnd();
|
|
81
|
+
await flowEngine.endFlow('USER_CLOSED');
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
watchForRestoredDraft();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Drop a pending end from {@link endDraftFlowSession}. A new preview calls this. */
|
|
88
|
+
export function cancelPendingDraftEnd() {
|
|
89
|
+
endDraftOnArrival = false;
|
|
90
|
+
unsubscribeDraftArrival?.();
|
|
91
|
+
unsubscribeDraftArrival = null;
|
|
92
|
+
}
|
|
93
|
+
function watchForRestoredDraft() {
|
|
94
|
+
endDraftOnArrival = true;
|
|
95
|
+
if (!flowEngine || unsubscribeDraftArrival) return;
|
|
96
|
+
const engine = flowEngine;
|
|
97
|
+
unsubscribeDraftArrival = engine.on(event => {
|
|
98
|
+
if (event.type !== 'sessionChange' || !endDraftOnArrival) return;
|
|
99
|
+
const session = engine.getHeldFlowSession();
|
|
100
|
+
if (!session?.draftMode) return;
|
|
101
|
+
cancelPendingDraftEnd();
|
|
102
|
+
void engine.endFlow('USER_CLOSED').catch(() => {
|
|
103
|
+
// The session can disappear before EndFlow is built. Nothing to send.
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* `userflow.endFlow()` from an Evaluate JavaScript page. Ends the current
|
|
110
|
+
* session only if one of the page's scripts came from it, so a stale page
|
|
111
|
+
* cannot end a flow that started later.
|
|
112
|
+
*/
|
|
113
|
+
export async function endEvalJsFlowSession(sessionIds) {
|
|
114
|
+
const session = flowEngine?.getFlowSession();
|
|
115
|
+
if (!flowEngine || !session || !sessionIds.has(session.id)) return;
|
|
116
|
+
await flowEngine.endFlow('USERFLOWJS');
|
|
47
117
|
}
|
|
48
118
|
|
|
49
119
|
/** Test helper: drop the singleton so the next get recreates it. */
|
|
50
120
|
export function __resetFlowSessionEngineForTests() {
|
|
121
|
+
cancelPendingDraftEnd();
|
|
51
122
|
flowEngine?.reset();
|
|
52
123
|
flowEngine = null;
|
|
53
124
|
}
|
|
@@ -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;
|
|
1
|
+
{"version":3,"names":["FlowSessionEngine","evalJsController","openFlowNavigateUrl","isolateAsync","flowEngine","endDraftOnArrival","unsubscribeDraftArrival","getFlowSessionEngine","core","transport","send","message","onServerMessage","handler","setFlowSessionId","id","onOpenExternalUrl","url","rethrowHostContract","onEvalJs","request","enqueue","updateUser","attributes","updateGroup","options","watchForRestoredDraft","attachFlowSessionEngine","engine","attach","resetFlowSessionEngine","reset","clearFlowSessionEngineLocalSession","clearLocalSession","hasActiveFlowSession","hasHeldFlowSession","endDraftFlowSession","session","getHeldFlowSession","draftMode","cancelPendingDraftEnd","endFlow","on","event","type","catch","endEvalJsFlowSession","sessionIds","getFlowSession","has","__resetFlowSessionEngineForTests"],"sourceRoot":"../../../src","sources":["runtime/flowEngine.ts"],"mappings":"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","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;
|