@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
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { isPairingPushAckTimeout } from '@userflow-tech/core';
|
|
4
|
+
import { elementPickerController } from "../authoring/elementPickerController.js";
|
|
5
|
+
function asRecord(payload) {
|
|
6
|
+
return payload && typeof payload === 'object' ? payload : {};
|
|
7
|
+
}
|
|
8
|
+
function idempotencyKeyOf(payload) {
|
|
9
|
+
const key = asRecord(payload)['idempotency_key'];
|
|
10
|
+
return typeof key === 'string' && key.length > 0 ? key : null;
|
|
11
|
+
}
|
|
12
|
+
function resultPayload(key, result) {
|
|
13
|
+
return {
|
|
14
|
+
idempotency_key: key,
|
|
15
|
+
ok: true,
|
|
16
|
+
autoData: result.autoData,
|
|
17
|
+
text: result.text ?? null,
|
|
18
|
+
...(result.screenshot ? {
|
|
19
|
+
screenshot: {
|
|
20
|
+
dataUrl: result.screenshot.dataUrl,
|
|
21
|
+
width: result.screenshot.width,
|
|
22
|
+
height: result.screenshot.height,
|
|
23
|
+
targetX1: result.screenshot.targetX1,
|
|
24
|
+
targetY1: result.screenshot.targetY1,
|
|
25
|
+
targetX2: result.screenshot.targetX2,
|
|
26
|
+
targetY2: result.screenshot.targetY2
|
|
27
|
+
}
|
|
28
|
+
} : {})
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Bridge pairing-channel `selectElement*` events onto {@link elementPickerController}.
|
|
34
|
+
* UI-free: the overlay (and QA harness) own the actual picking.
|
|
35
|
+
*/
|
|
36
|
+
export function bindElementPickerRelay(engine) {
|
|
37
|
+
if (typeof engine.onRelay !== 'function' || typeof engine.sendRelay !== 'function') {
|
|
38
|
+
return () => undefined;
|
|
39
|
+
}
|
|
40
|
+
let ignoreNextCancelSend = false;
|
|
41
|
+
|
|
42
|
+
/** Result delivery: ignore ack timeouts; surface connection failures. */
|
|
43
|
+
const sendResult = async (key, result) => {
|
|
44
|
+
try {
|
|
45
|
+
await engine.sendRelay('selectElementResult', resultPayload(key, result));
|
|
46
|
+
} catch (error) {
|
|
47
|
+
if (typeof isPairingPushAckTimeout === 'function' && isPairingPushAckTimeout(error)) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** Cancel is best-effort: ignore timeout and disconnect. */
|
|
55
|
+
const sendCancel = key => {
|
|
56
|
+
void engine.sendRelay('selectElementCancel', {
|
|
57
|
+
idempotency_key: key
|
|
58
|
+
}).catch(() => undefined);
|
|
59
|
+
};
|
|
60
|
+
const unsub = engine.onRelay((event, payload) => {
|
|
61
|
+
if (event === 'selectElement') {
|
|
62
|
+
const key = idempotencyKeyOf(payload);
|
|
63
|
+
if (!key) return;
|
|
64
|
+
elementPickerController.beginSelection({
|
|
65
|
+
requestId: key,
|
|
66
|
+
onResult: result => sendResult(key, result),
|
|
67
|
+
onCancel: () => {
|
|
68
|
+
if (ignoreNextCancelSend) return;
|
|
69
|
+
sendCancel(key);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (event === 'selectElementCancel') {
|
|
75
|
+
ignoreNextCancelSend = true;
|
|
76
|
+
elementPickerController.cancel();
|
|
77
|
+
ignoreNextCancelSend = false;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return () => {
|
|
81
|
+
unsub();
|
|
82
|
+
ignoreNextCancelSend = true;
|
|
83
|
+
elementPickerController.cancel();
|
|
84
|
+
ignoreNextCancelSend = false;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=elementPickerRelay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isPairingPushAckTimeout","elementPickerController","asRecord","payload","idempotencyKeyOf","key","length","resultPayload","result","idempotency_key","ok","autoData","text","screenshot","dataUrl","width","height","targetX1","targetY1","targetX2","targetY2","bindElementPickerRelay","engine","onRelay","sendRelay","undefined","ignoreNextCancelSend","sendResult","error","sendCancel","catch","unsub","event","beginSelection","requestId","onResult","onCancel","cancel"],"sourceRoot":"../../../src","sources":["pairing/elementPickerRelay.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function isBannerVisible(state) {
|
|
4
|
+
if (!state.previewActive && state.status === 'idle') return false;
|
|
5
|
+
if (!state.previewActive && state.status !== 'token_expired' && state.status !== 'device_already_paired' && state.status !== 'error') {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
function shown(tone, label, numberOfLines = 1) {
|
|
11
|
+
return {
|
|
12
|
+
visible: true,
|
|
13
|
+
tone,
|
|
14
|
+
label,
|
|
15
|
+
numberOfLines
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Maps pairing-engine state onto the preview top-bar chrome.
|
|
21
|
+
* Pure: no React, so the nine-case table can be asserted without a renderer.
|
|
22
|
+
*/
|
|
23
|
+
export function resolvePreviewChrome(state) {
|
|
24
|
+
if (!isBannerVisible(state)) return {
|
|
25
|
+
visible: false
|
|
26
|
+
};
|
|
27
|
+
switch (state.status) {
|
|
28
|
+
case 'connecting':
|
|
29
|
+
return shown('default', 'Connecting to Builder…');
|
|
30
|
+
case 'reconnecting':
|
|
31
|
+
return shown('default', 'Reconnecting…');
|
|
32
|
+
case 'token_expired':
|
|
33
|
+
return shown('error', 'Pairing ended - rescan to continue', 2);
|
|
34
|
+
case 'device_already_paired':
|
|
35
|
+
return shown('error', 'Another device is already paired', 2);
|
|
36
|
+
case 'error':
|
|
37
|
+
if (state.pairingId === null) {
|
|
38
|
+
return shown('error', 'Preview unavailable');
|
|
39
|
+
}
|
|
40
|
+
return shown('error', 'Pairing ended - rescan to continue', 2);
|
|
41
|
+
default:
|
|
42
|
+
if (state.awaitingStartCondition) {
|
|
43
|
+
return shown('default', 'Waiting for auto-start condition…');
|
|
44
|
+
}
|
|
45
|
+
return shown('default', 'Preview mode');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=resolvePreviewChrome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isBannerVisible","state","previewActive","status","shown","tone","label","numberOfLines","visible","resolvePreviewChrome","pairingId","awaitingStartCondition"],"sourceRoot":"../../../src","sources":["pairing/resolvePreviewChrome.ts"],"mappings":";;AAQA,SAASA,eAAeA,CAACC,KAAyB,EAAW;EAC3D,IAAI,CAACA,KAAK,CAACC,aAAa,IAAID,KAAK,CAACE,MAAM,KAAK,MAAM,EAAE,OAAO,KAAK;EACjE,IACE,CAACF,KAAK,CAACC,aAAa,IACpBD,KAAK,CAACE,MAAM,KAAK,eAAe,IAChCF,KAAK,CAACE,MAAM,KAAK,uBAAuB,IACxCF,KAAK,CAACE,MAAM,KAAK,OAAO,EACxB;IACA,OAAO,KAAK;EACd;EACA,OAAO,IAAI;AACb;AAEA,SAASC,KAAKA,CACZC,IAAsB,EACtBC,KAAa,EACbC,aAAa,GAAG,CAAC,EAC0B;EAC3C,OAAO;IAAEC,OAAO,EAAE,IAAI;IAAEH,IAAI;IAAEC,KAAK;IAAEC;EAAc,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASE,oBAAoBA,CAACR,KAAyB,EAAiB;EAC7E,IAAI,CAACD,eAAe,CAACC,KAAK,CAAC,EAAE,OAAO;IAAEO,OAAO,EAAE;EAAM,CAAC;EAEtD,QAAQP,KAAK,CAACE,MAAM;IAClB,KAAK,YAAY;MACf,OAAOC,KAAK,CAAC,SAAS,EAAE,wBAAwB,CAAC;IACnD,KAAK,cAAc;MACjB,OAAOA,KAAK,CAAC,SAAS,EAAE,eAAe,CAAC;IAC1C,KAAK,eAAe;MAClB,OAAOA,KAAK,CAAC,OAAO,EAAE,oCAAoC,EAAE,CAAC,CAAC;IAChE,KAAK,uBAAuB;MAC1B,OAAOA,KAAK,CAAC,OAAO,EAAE,kCAAkC,EAAE,CAAC,CAAC;IAC9D,KAAK,OAAO;MACV,IAAIH,KAAK,CAACS,SAAS,KAAK,IAAI,EAAE;QAC5B,OAAON,KAAK,CAAC,OAAO,EAAE,qBAAqB,CAAC;MAC9C;MACA,OAAOA,KAAK,CAAC,OAAO,EAAE,oCAAoC,EAAE,CAAC,CAAC;IAChE;MACE,IAAIH,KAAK,CAACU,sBAAsB,EAAE;QAChC,OAAOP,KAAK,CAAC,SAAS,EAAE,mCAAmC,CAAC;MAC9D;MACA,OAAOA,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC;EAC3C;AACF","ignoreList":[]}
|
|
@@ -1,24 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Persist the pairing JWT
|
|
5
|
-
*
|
|
4
|
+
* Persist the pairing JWT so a relaunch can resume Builder pairing until the
|
|
5
|
+
* token expires or preview is exited. Resume requires `expo-secure-store`;
|
|
6
|
+
* the in-memory fallback does not survive a process restart.
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
import { parsePairingPurpose } from "./deepLink.js";
|
|
10
|
+
|
|
11
|
+
// SecureStore rejects keys outside [A-Za-z0-9._-], so no `userflow:` prefix here.
|
|
12
|
+
export const PAIRING_TOKEN_STORAGE_KEY = 'userflow.pairingToken';
|
|
13
|
+
export const PAIRING_PURPOSE_STORAGE_KEY = 'userflow.pairingPurpose';
|
|
14
|
+
let cachedSecureStore;
|
|
15
|
+
|
|
16
|
+
/** Expo modules must be installed natively — not just the JS package. */
|
|
17
|
+
function isExpoModulesRuntimeAvailable() {
|
|
18
|
+
const expo = globalThis.expo;
|
|
19
|
+
return typeof expo?.EventEmitter === 'function';
|
|
20
|
+
}
|
|
9
21
|
function tryLoadExpoSecureStore() {
|
|
22
|
+
if (cachedSecureStore !== undefined) return cachedSecureStore;
|
|
23
|
+
if (typeof require !== 'function' || !isExpoModulesRuntimeAvailable()) {
|
|
24
|
+
cachedSecureStore = null;
|
|
25
|
+
return cachedSecureStore;
|
|
26
|
+
}
|
|
10
27
|
try {
|
|
11
28
|
// Optional peer — absent in bare RN without expo-secure-store.
|
|
12
29
|
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -- optional peer at import time
|
|
13
|
-
|
|
30
|
+
cachedSecureStore = require('expo-secure-store');
|
|
14
31
|
} catch {
|
|
15
|
-
|
|
32
|
+
cachedSecureStore = null;
|
|
33
|
+
if (__DEV__) {
|
|
34
|
+
// eslint-disable-next-line no-console -- intentional missing-optional-peer diagnostic
|
|
35
|
+
console.warn('[Userflow] Optional peer expo-secure-store is unavailable; ' + 'pairing JWT persistence falls back to in-memory storage.');
|
|
36
|
+
}
|
|
16
37
|
}
|
|
38
|
+
return cachedSecureStore;
|
|
17
39
|
}
|
|
18
40
|
|
|
19
41
|
/** In-memory store used when SecureStore is unavailable (and in tests). */
|
|
20
42
|
export function createMemoryPairingTokenStore() {
|
|
21
43
|
let value = null;
|
|
44
|
+
let purposeValue = null;
|
|
22
45
|
return {
|
|
23
46
|
async get() {
|
|
24
47
|
return value;
|
|
@@ -28,6 +51,13 @@ export function createMemoryPairingTokenStore() {
|
|
|
28
51
|
},
|
|
29
52
|
async clear() {
|
|
30
53
|
value = null;
|
|
54
|
+
purposeValue = null;
|
|
55
|
+
},
|
|
56
|
+
async getPurpose() {
|
|
57
|
+
return purposeValue;
|
|
58
|
+
},
|
|
59
|
+
async setPurpose(purpose) {
|
|
60
|
+
purposeValue = purpose;
|
|
31
61
|
}
|
|
32
62
|
};
|
|
33
63
|
}
|
|
@@ -41,25 +71,57 @@ export function createPairingTokenStore() {
|
|
|
41
71
|
return {
|
|
42
72
|
async get() {
|
|
43
73
|
try {
|
|
44
|
-
return await secure.getItemAsync(
|
|
74
|
+
return await secure.getItemAsync(PAIRING_TOKEN_STORAGE_KEY);
|
|
45
75
|
} catch {
|
|
46
76
|
return null;
|
|
47
77
|
}
|
|
48
78
|
},
|
|
49
79
|
async set(token) {
|
|
50
80
|
try {
|
|
51
|
-
await secure.setItemAsync(
|
|
52
|
-
} catch {
|
|
81
|
+
await secure.setItemAsync(PAIRING_TOKEN_STORAGE_KEY, token);
|
|
82
|
+
} catch (error) {
|
|
53
83
|
// Best-effort; reconnect still works from in-memory PairingEngine token.
|
|
84
|
+
if (__DEV__) {
|
|
85
|
+
// eslint-disable-next-line no-console -- intentional persistence diagnostic
|
|
86
|
+
console.warn('[Userflow] Could not save the pairing token, so preview will not resume after a relaunch:', error instanceof Error ? error.message : String(error));
|
|
87
|
+
}
|
|
54
88
|
}
|
|
55
89
|
},
|
|
56
90
|
async clear() {
|
|
57
91
|
try {
|
|
58
|
-
await secure.deleteItemAsync(
|
|
92
|
+
await secure.deleteItemAsync(PAIRING_TOKEN_STORAGE_KEY);
|
|
93
|
+
} catch {
|
|
94
|
+
// ignore
|
|
95
|
+
}
|
|
96
|
+
try {
|
|
97
|
+
await secure.deleteItemAsync(PAIRING_PURPOSE_STORAGE_KEY);
|
|
59
98
|
} catch {
|
|
60
99
|
// ignore
|
|
61
100
|
}
|
|
101
|
+
},
|
|
102
|
+
async getPurpose() {
|
|
103
|
+
try {
|
|
104
|
+
return parsePairingPurpose(await secure.getItemAsync(PAIRING_PURPOSE_STORAGE_KEY));
|
|
105
|
+
} catch {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
async setPurpose(purpose) {
|
|
110
|
+
try {
|
|
111
|
+
if (purpose) {
|
|
112
|
+
await secure.setItemAsync(PAIRING_PURPOSE_STORAGE_KEY, purpose);
|
|
113
|
+
} else {
|
|
114
|
+
await secure.deleteItemAsync(PAIRING_PURPOSE_STORAGE_KEY);
|
|
115
|
+
}
|
|
116
|
+
} catch {
|
|
117
|
+
// Best-effort; a resume without it falls back to the default reveal.
|
|
118
|
+
}
|
|
62
119
|
}
|
|
63
120
|
};
|
|
64
121
|
}
|
|
122
|
+
|
|
123
|
+
/** @internal Resets module cache between tests. */
|
|
124
|
+
export function resetPairingTokenStoreCacheForTests() {
|
|
125
|
+
cachedSecureStore = undefined;
|
|
126
|
+
}
|
|
65
127
|
//# sourceMappingURL=tokenStorage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["parsePairingPurpose","PAIRING_TOKEN_STORAGE_KEY","PAIRING_PURPOSE_STORAGE_KEY","cachedSecureStore","isExpoModulesRuntimeAvailable","expo","globalThis","EventEmitter","tryLoadExpoSecureStore","undefined","require","__DEV__","console","warn","createMemoryPairingTokenStore","value","purposeValue","get","set","token","clear","getPurpose","setPurpose","purpose","createPairingTokenStore","secure","getItemAsync","setItemAsync","error","Error","message","String","deleteItemAsync","resetPairingTokenStoreCacheForTests"],"sourceRoot":"../../../src","sources":["pairing/tokenStorage.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -9,7 +9,11 @@ const IDLE = {
|
|
|
9
9
|
previewActive: false,
|
|
10
10
|
lastError: null,
|
|
11
11
|
needsRescan: false,
|
|
12
|
-
awaitingStartCondition: false
|
|
12
|
+
awaitingStartCondition: false,
|
|
13
|
+
canRestartPreview: false,
|
|
14
|
+
previewRestartGeneration: 0,
|
|
15
|
+
pairingSessionGeneration: 0,
|
|
16
|
+
previewStartGeneration: 0
|
|
13
17
|
};
|
|
14
18
|
|
|
15
19
|
/** Subscribe to Builder pairing / preview-mode state (dev builds only). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","onPairingController","peekPairingController","IDLE","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","usePairingState","state","setState","useState","getState","useEffect","unsubState","bind","controller","onStateChange","existing","unsubInstall"],"sourceRoot":"../../../src","sources":["pairing/usePairingState.ts"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,mBAAmB,EAAEC,qBAAqB,QAAQ,qBAAkB;AAE7E,MAAMC,IAAwB,GAAG;EAC/BC,MAAM,EAAE,MAAM;EACdC,SAAS,EAAE,IAAI;EACfC,QAAQ,EAAE,IAAI;EACdC,aAAa,EAAE,KAAK;EACpBC,SAAS,EAAE,IAAI;EACfC,WAAW,EAAE,KAAK;EAClBC,sBAAsB,EAAE;AAC1B,CAAC;;AAED;AACA,OAAO,SAASC,eAAeA,CAAA,EAAuB;EACpD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"names":["React","onPairingController","peekPairingController","IDLE","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","canRestartPreview","previewRestartGeneration","pairingSessionGeneration","previewStartGeneration","usePairingState","state","setState","useState","getState","useEffect","unsubState","bind","controller","onStateChange","existing","unsubInstall"],"sourceRoot":"../../../src","sources":["pairing/usePairingState.ts"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,mBAAmB,EAAEC,qBAAqB,QAAQ,qBAAkB;AAE7E,MAAMC,IAAwB,GAAG;EAC/BC,MAAM,EAAE,MAAM;EACdC,SAAS,EAAE,IAAI;EACfC,QAAQ,EAAE,IAAI;EACdC,aAAa,EAAE,KAAK;EACpBC,SAAS,EAAE,IAAI;EACfC,WAAW,EAAE,KAAK;EAClBC,sBAAsB,EAAE,KAAK;EAC7BC,iBAAiB,EAAE,KAAK;EACxBC,wBAAwB,EAAE,CAAC;EAC3BC,wBAAwB,EAAE,CAAC;EAC3BC,sBAAsB,EAAE;AAC1B,CAAC;;AAED;AACA,OAAO,SAASC,eAAeA,CAAA,EAAuB;EACpD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGjB,KAAK,CAACkB,QAAQ,CACtC,MAAMhB,qBAAqB,CAAC,CAAC,EAAEiB,QAAQ,CAAC,CAAC,IAAIhB,IAC/C,CAAC;EAEDH,KAAK,CAACoB,SAAS,CAAC,MAAM;IACpB,IAAIC,UAAoC;IAExC,MAAMC,IAAI,GAAIC,UAA6B,IAAK;MAC9CF,UAAU,GAAG,CAAC;MACdJ,QAAQ,CAACM,UAAU,CAACJ,QAAQ,CAAC,CAAC,CAAC;MAC/BE,UAAU,GAAGE,UAAU,CAACC,aAAa,CAACP,QAAQ,CAAC;IACjD,CAAC;IAED,MAAMQ,QAAQ,GAAGvB,qBAAqB,CAAC,CAAC;IACxC,IAAIuB,QAAQ,EAAEH,IAAI,CAACG,QAAQ,CAAC;IAC5B,MAAMC,YAAY,GAAGzB,mBAAmB,CAACqB,IAAI,CAAC;IAE9C,OAAO,MAAM;MACXI,YAAY,CAAC,CAAC;MACdL,UAAU,GAAG,CAAC;IAChB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOL,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { resolvePreviewChrome } from "./resolvePreviewChrome.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* How long a new pairing session with no `purpose` on its link keeps the
|
|
8
|
+
* default preview bar hidden, so a `selectElement` that arrives after the join
|
|
9
|
+
* never flashes "Preview mode". Restarts once when the socket first reaches
|
|
10
|
+
* `connected` while the hold is still up: a slow connect still shows
|
|
11
|
+
* "Connecting…" after this delay, and a pick that starts shortly after the
|
|
12
|
+
* join stays inside the window.
|
|
13
|
+
*/
|
|
14
|
+
export const INITIAL_REVEAL_DELAY_MS = 2000;
|
|
15
|
+
/**
|
|
16
|
+
* A new session (or chrome appearing) is decided by the link's purpose:
|
|
17
|
+
* `select_element` starts in the selection hold, `preview` is never held, and
|
|
18
|
+
* no purpose falls back to the intro hold. The intro hold hides the bar when
|
|
19
|
+
* preview chrome appears, and again when the session changes while a hold is
|
|
20
|
+
* already hiding it. A bar that is already showing stays up across a re-scan
|
|
21
|
+
* with no purpose. Selection hold replaces the intro once the picker is active
|
|
22
|
+
* and outlives the picker until a Builder preview, a `preview` re-scan, or a
|
|
23
|
+
* re-scan with no purpose. A `select_element` re-scan starts held, including
|
|
24
|
+
* when the bar is already up.
|
|
25
|
+
*/
|
|
26
|
+
function decideHold(prev, holds, input) {
|
|
27
|
+
let introHeld = holds.introHeld;
|
|
28
|
+
let selectionHeld = holds.selectionHeld;
|
|
29
|
+
let connectRestarted = prev.connectRestarted;
|
|
30
|
+
let restartTimer = false;
|
|
31
|
+
const armIntro = () => {
|
|
32
|
+
introHeld = true;
|
|
33
|
+
connectRestarted = false;
|
|
34
|
+
restartTimer = true;
|
|
35
|
+
};
|
|
36
|
+
if (!input.chromeVisible) {
|
|
37
|
+
return {
|
|
38
|
+
introHeld: false,
|
|
39
|
+
selectionHeld: false,
|
|
40
|
+
restartTimer: false,
|
|
41
|
+
inputs: {
|
|
42
|
+
...input,
|
|
43
|
+
connectRestarted: false
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const sessionChanged = input.session !== prev.session;
|
|
48
|
+
const previewStarted = input.previewStart > prev.previewStart;
|
|
49
|
+
if (previewStarted) {
|
|
50
|
+
introHeld = false;
|
|
51
|
+
selectionHeld = false;
|
|
52
|
+
connectRestarted = true;
|
|
53
|
+
} else if (input.pickerActive) {
|
|
54
|
+
selectionHeld = true;
|
|
55
|
+
introHeld = false;
|
|
56
|
+
} else if (sessionChanged || !prev.chromeVisible) {
|
|
57
|
+
if (input.purpose === 'select_element') {
|
|
58
|
+
selectionHeld = true;
|
|
59
|
+
introHeld = false;
|
|
60
|
+
} else if (input.purpose === 'preview') {
|
|
61
|
+
selectionHeld = false;
|
|
62
|
+
introHeld = false;
|
|
63
|
+
} else if (introHeld || selectionHeld || !prev.chromeVisible) {
|
|
64
|
+
selectionHeld = false;
|
|
65
|
+
armIntro();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (introHeld && input.status === 'connected' && !connectRestarted) {
|
|
69
|
+
connectRestarted = true;
|
|
70
|
+
restartTimer = true;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
introHeld,
|
|
74
|
+
selectionHeld,
|
|
75
|
+
restartTimer,
|
|
76
|
+
inputs: {
|
|
77
|
+
...input,
|
|
78
|
+
connectRestarted
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Whether the preview top bar should stay down.
|
|
85
|
+
*
|
|
86
|
+
* The decision is applied during render. Waiting for an effect would mount
|
|
87
|
+
* the bar for a frame and play its slide-in before the hold could hide it.
|
|
88
|
+
* The reveal timer stays in an effect.
|
|
89
|
+
*/
|
|
90
|
+
export function usePreviewBarHold(state, pickerActive) {
|
|
91
|
+
const chromeVisible = resolvePreviewChrome(state).visible;
|
|
92
|
+
const [introHeld, setIntroHeld] = React.useState(false);
|
|
93
|
+
const [selectionHeld, setSelectionHeld] = React.useState(false);
|
|
94
|
+
const [introEpoch, setIntroEpoch] = React.useState(0);
|
|
95
|
+
const purpose = state.pairingPurpose ?? null;
|
|
96
|
+
const inputsRef = React.useRef({
|
|
97
|
+
session: state.pairingSessionGeneration,
|
|
98
|
+
previewStart: state.previewStartGeneration,
|
|
99
|
+
chromeVisible: false,
|
|
100
|
+
pickerActive: false,
|
|
101
|
+
status: state.status,
|
|
102
|
+
purpose,
|
|
103
|
+
connectRestarted: false
|
|
104
|
+
});
|
|
105
|
+
const decision = decideHold(inputsRef.current, {
|
|
106
|
+
introHeld,
|
|
107
|
+
selectionHeld
|
|
108
|
+
}, {
|
|
109
|
+
session: state.pairingSessionGeneration,
|
|
110
|
+
previewStart: state.previewStartGeneration,
|
|
111
|
+
chromeVisible,
|
|
112
|
+
pickerActive,
|
|
113
|
+
status: state.status,
|
|
114
|
+
purpose,
|
|
115
|
+
connectRestarted: false
|
|
116
|
+
});
|
|
117
|
+
inputsRef.current = decision.inputs;
|
|
118
|
+
if (decision.introHeld !== introHeld) {
|
|
119
|
+
setIntroHeld(decision.introHeld);
|
|
120
|
+
}
|
|
121
|
+
if (decision.selectionHeld !== selectionHeld) {
|
|
122
|
+
setSelectionHeld(decision.selectionHeld);
|
|
123
|
+
}
|
|
124
|
+
if (decision.restartTimer) {
|
|
125
|
+
setIntroEpoch(epoch => epoch + 1);
|
|
126
|
+
}
|
|
127
|
+
React.useEffect(() => {
|
|
128
|
+
if (!introHeld) return;
|
|
129
|
+
const timer = setTimeout(() => setIntroHeld(false), INITIAL_REVEAL_DELAY_MS);
|
|
130
|
+
return () => clearTimeout(timer);
|
|
131
|
+
}, [introEpoch, introHeld]);
|
|
132
|
+
return decision.introHeld || decision.selectionHeld;
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=usePreviewBarHold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","resolvePreviewChrome","INITIAL_REVEAL_DELAY_MS","decideHold","prev","holds","input","introHeld","selectionHeld","connectRestarted","restartTimer","armIntro","chromeVisible","inputs","sessionChanged","session","previewStarted","previewStart","pickerActive","purpose","status","usePreviewBarHold","state","visible","setIntroHeld","useState","setSelectionHeld","introEpoch","setIntroEpoch","pairingPurpose","inputsRef","useRef","pairingSessionGeneration","previewStartGeneration","decision","current","epoch","useEffect","timer","setTimeout","clearTimeout"],"sourceRoot":"../../../src","sources":["pairing/usePreviewBarHold.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { BannerSurface } from "../surfaces/BannerSurface.js";
|
|
6
|
+
import { bannerOverlayHostPadding } from "../surfaces/bannerBarLayout.js";
|
|
7
|
+
import { resolveBannerBackgroundColor } from "../surfaces/resolveBannerTheme.js";
|
|
8
|
+
import { useUserflowSafeAreaInsets } from "../surfaces/safeArea.js";
|
|
9
|
+
import { SdkErrorBoundary } from "./SdkErrorBoundary.js";
|
|
10
|
+
import { bannerEdge, embedBannerPlaceholderId, warnBannerOnce } from "./bannerPlacement.js";
|
|
11
|
+
import { hasEmbedBannerPlaceholder } from "./embedBannerRegistry.js";
|
|
12
|
+
import { useBannerSession } from "./useBannerSession.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Top or bottom banner bar. Element modes render in {@link EmbedBannerPlaceholder}.
|
|
16
|
+
*
|
|
17
|
+
* `overlay` floats over the host. `flow` sits in layout and pushes the app.
|
|
18
|
+
* The bar does not participate in the host accessibility trap.
|
|
19
|
+
*/
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
export function BannerHost({
|
|
22
|
+
engine,
|
|
23
|
+
hidden,
|
|
24
|
+
placement = 'overlay',
|
|
25
|
+
edge: edgeFilter
|
|
26
|
+
}) {
|
|
27
|
+
const session = useBannerSession(engine);
|
|
28
|
+
const banner = session?.version.banner ?? null;
|
|
29
|
+
const edge = banner ? bannerEdge(banner.embedMode) : null;
|
|
30
|
+
const insets = useUserflowSafeAreaInsets();
|
|
31
|
+
React.useEffect(() => {
|
|
32
|
+
if (!session || !banner || edge) return;
|
|
33
|
+
const placeholderId = embedBannerPlaceholderId(banner);
|
|
34
|
+
if (placeholderId && hasEmbedBannerPlaceholder(placeholderId)) return;
|
|
35
|
+
const message = placeholderId ? `Userflow: no EmbedBannerPlaceholder with id "${placeholderId}" is mounted; the banner is not shown` : `Userflow: banner embed mode ${banner.embedMode} needs a manual embed selector and an EmbedBannerPlaceholder with that id`;
|
|
36
|
+
warnBannerOnce(`embed:${session.id}:${banner.embedMode}:${placeholderId ?? 'none'}`, message);
|
|
37
|
+
}, [banner, edge, session]);
|
|
38
|
+
if (hidden || !session || !banner || !edge) return null;
|
|
39
|
+
if (edgeFilter && edge !== edgeFilter) return null;
|
|
40
|
+
const floats = banner.overlay !== false;
|
|
41
|
+
if (placement === 'overlay' !== floats) return null;
|
|
42
|
+
const bar = /*#__PURE__*/_jsx(SdkErrorBoundary, {
|
|
43
|
+
scope: "banner",
|
|
44
|
+
resetKey: session.id,
|
|
45
|
+
children: /*#__PURE__*/_jsx(BannerSurface, {
|
|
46
|
+
session: session,
|
|
47
|
+
onActions: actions => engine.handleActions(actions),
|
|
48
|
+
onDismiss: endReason => {
|
|
49
|
+
void engine.endBanner(endReason);
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
if (placement === 'flow') {
|
|
54
|
+
const backgroundColor = bannerBackground(session);
|
|
55
|
+
const safePad = edge === 'top' ? {
|
|
56
|
+
paddingTop: insets.top
|
|
57
|
+
} : {
|
|
58
|
+
paddingBottom: insets.bottom
|
|
59
|
+
};
|
|
60
|
+
return /*#__PURE__*/_jsx(View, {
|
|
61
|
+
testID: "userflow-banner-flow",
|
|
62
|
+
style: [styles.flow, safePad, {
|
|
63
|
+
backgroundColor
|
|
64
|
+
}],
|
|
65
|
+
children: bar
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const edgeStyle = edge === 'top' ? {
|
|
69
|
+
top: insets.top
|
|
70
|
+
} : {
|
|
71
|
+
bottom: insets.bottom
|
|
72
|
+
};
|
|
73
|
+
return /*#__PURE__*/_jsx(View, {
|
|
74
|
+
pointerEvents: "box-none",
|
|
75
|
+
style: [styles.pin, edgeStyle, bannerOverlayHostPadding(insets)],
|
|
76
|
+
children: bar
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function bannerBackground(session) {
|
|
80
|
+
return resolveBannerBackgroundColor(session.version.theme);
|
|
81
|
+
}
|
|
82
|
+
const styles = StyleSheet.create({
|
|
83
|
+
pin: {
|
|
84
|
+
position: 'absolute',
|
|
85
|
+
left: 0,
|
|
86
|
+
right: 0
|
|
87
|
+
},
|
|
88
|
+
flow: {
|
|
89
|
+
alignSelf: 'stretch'
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
//# sourceMappingURL=BannerHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","BannerSurface","bannerOverlayHostPadding","resolveBannerBackgroundColor","useUserflowSafeAreaInsets","SdkErrorBoundary","bannerEdge","embedBannerPlaceholderId","warnBannerOnce","hasEmbedBannerPlaceholder","useBannerSession","jsx","_jsx","BannerHost","engine","hidden","placement","edge","edgeFilter","session","banner","version","embedMode","insets","useEffect","placeholderId","message","id","floats","overlay","bar","scope","resetKey","children","onActions","actions","handleActions","onDismiss","endReason","endBanner","backgroundColor","bannerBackground","safePad","paddingTop","top","paddingBottom","bottom","testID","style","styles","flow","edgeStyle","pointerEvents","pin","theme","create","position","left","right","alignSelf"],"sourceRoot":"../../../src","sources":["runtime/BannerHost.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { elementPickerController } from "../authoring/elementPickerController.js";
|
|
6
|
+
import { BannerSurface } from "../surfaces/BannerSurface.js";
|
|
7
|
+
import { bannerOverlayHostPadding } from "../surfaces/bannerBarLayout.js";
|
|
8
|
+
import { useUserflowSafeAreaInsets } from "../surfaces/safeArea.js";
|
|
9
|
+
import { SdkErrorBoundary } from "./SdkErrorBoundary.js";
|
|
10
|
+
import { BannerEngineContext } from "./bannerEngineContext.js";
|
|
11
|
+
import { embedBannerPlaceholderId, warnBannerOnce } from "./bannerPlacement.js";
|
|
12
|
+
import { registerEmbedBannerPlaceholder } from "./embedBannerRegistry.js";
|
|
13
|
+
import { useBannerSession } from "./useBannerSession.js";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
/**
|
|
16
|
+
* Host slot for an element-mode banner (`ELEMENT_BEFORE`, `ELEMENT_AFTER`,
|
|
17
|
+
* `ELEMENT_FIRST`, `ELEMENT_LAST`). Mount it where the bar should appear.
|
|
18
|
+
* Until a matching banner is active the slot renders nothing, so it takes no
|
|
19
|
+
* space and is not visible. Top and bottom bars ignore this slot.
|
|
20
|
+
* `overlay: false` keeps the bar in layout; `overlay: true` paints it over
|
|
21
|
+
* the content below the slot.
|
|
22
|
+
*/
|
|
23
|
+
export function EmbedBannerPlaceholder({
|
|
24
|
+
id
|
|
25
|
+
}) {
|
|
26
|
+
const engine = React.useContext(BannerEngineContext);
|
|
27
|
+
const placeholderId = id.trim();
|
|
28
|
+
const session = useBannerSession(engine);
|
|
29
|
+
const insets = useUserflowSafeAreaInsets();
|
|
30
|
+
const [pickerActive, setPickerActive] = React.useState(() => elementPickerController.getState().active);
|
|
31
|
+
React.useEffect(() => {
|
|
32
|
+
return elementPickerController.subscribe(next => {
|
|
33
|
+
setPickerActive(next.active);
|
|
34
|
+
});
|
|
35
|
+
}, []);
|
|
36
|
+
React.useLayoutEffect(() => {
|
|
37
|
+
if (!placeholderId) {
|
|
38
|
+
warnBannerOnce('embed-banner-empty-id', 'Userflow: EmbedBannerPlaceholder requires an id');
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
return registerEmbedBannerPlaceholder(placeholderId);
|
|
42
|
+
}, [placeholderId]);
|
|
43
|
+
React.useEffect(() => {
|
|
44
|
+
if (engine) return;
|
|
45
|
+
warnBannerOnce('embed-banner-outside-provider', 'Userflow: EmbedBannerPlaceholder must be rendered inside UserflowProvider');
|
|
46
|
+
}, [engine]);
|
|
47
|
+
|
|
48
|
+
// No host view until a banner is actually shown. An empty slot would still
|
|
49
|
+
// participate in flex gap and stretch layout.
|
|
50
|
+
if (!engine || !placeholderId || pickerActive || !session) return null;
|
|
51
|
+
const banner = session.version.banner ?? null;
|
|
52
|
+
if (!banner || embedBannerPlaceholderId(banner) !== placeholderId) return null;
|
|
53
|
+
const bar = /*#__PURE__*/_jsx(BannerSurface, {
|
|
54
|
+
session: session,
|
|
55
|
+
onActions: actions => engine.handleActions(actions),
|
|
56
|
+
onDismiss: endReason => {
|
|
57
|
+
void engine.endBanner(endReason);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
return /*#__PURE__*/_jsx(SdkErrorBoundary, {
|
|
61
|
+
scope: "banner",
|
|
62
|
+
resetKey: session.id,
|
|
63
|
+
children: banner.overlay !== false ? /*#__PURE__*/_jsx(View, {
|
|
64
|
+
pointerEvents: "box-none",
|
|
65
|
+
testID: "userflow-embed-banner",
|
|
66
|
+
style: styles.overlaySlot,
|
|
67
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
68
|
+
pointerEvents: "box-none",
|
|
69
|
+
style: [styles.overlayBar, bannerOverlayHostPadding(insets)],
|
|
70
|
+
children: bar
|
|
71
|
+
})
|
|
72
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
73
|
+
testID: "userflow-embed-banner",
|
|
74
|
+
style: styles.slot,
|
|
75
|
+
children: bar
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
const styles = StyleSheet.create({
|
|
80
|
+
slot: {
|
|
81
|
+
alignSelf: 'stretch'
|
|
82
|
+
},
|
|
83
|
+
overlaySlot: {
|
|
84
|
+
height: 0,
|
|
85
|
+
alignSelf: 'stretch'
|
|
86
|
+
},
|
|
87
|
+
overlayBar: {
|
|
88
|
+
position: 'absolute',
|
|
89
|
+
left: 0,
|
|
90
|
+
right: 0,
|
|
91
|
+
top: 0
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=EmbedBannerPlaceholder.js.map
|