@userflow-tech/react-native 0.2.0 → 0.3.1
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 +435 -134
- package/app.plugin.js +11 -3
- package/babel-plugin/index.d.ts.map +1 -1
- package/babel-plugin/index.js +53 -6
- package/babel-plugin/index.js.map +1 -1
- package/babel-plugin.js +11 -3
- package/docs/anchoring.md +58 -42
- package/docs/deep-linking.md +70 -33
- package/docs/isolation.md +75 -0
- package/docs/troubleshooting.md +103 -44
- package/docs/webview-custom-banner-poc.md +64 -0
- package/expo-plugin/hostDependencyWarnings.d.ts +18 -0
- package/expo-plugin/hostDependencyWarnings.d.ts.map +1 -0
- package/expo-plugin/hostDependencyWarnings.js +91 -0
- package/expo-plugin/hostDependencyWarnings.js.map +1 -0
- package/expo-plugin/withUserflow.d.ts +3 -2
- package/expo-plugin/withUserflow.d.ts.map +1 -1
- package/expo-plugin/withUserflow.js +30 -8
- package/expo-plugin/withUserflow.js.map +1 -1
- package/lib/commonjs/anchors/AnchorRegistry.js +7 -0
- package/lib/commonjs/anchors/AnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/elementConditionEvaluator.js +189 -55
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/commonjs/anchors/elementTapMonitor.js +92 -0
- package/lib/commonjs/anchors/elementTapMonitor.js.map +1 -0
- package/lib/commonjs/anchors/elementTargetMatch.js +85 -0
- package/lib/commonjs/anchors/elementTargetMatch.js.map +1 -0
- 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 +122 -87
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js +220 -0
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/touchTargetFiber.js +105 -0
- package/lib/commonjs/anchors/fiber/touchTargetFiber.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/isInstanceOnVisibleScreen.js +51 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +2 -1
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +26 -17
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveElementTargets.js +158 -0
- package/lib/commonjs/anchors/resolveElementTargets.js.map +1 -0
- package/lib/commonjs/anchors/semanticMatcher.js +26 -8
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -1
- package/lib/commonjs/anchors/targetPressMonitor.js +9 -3
- package/lib/commonjs/anchors/targetPressMonitor.js.map +1 -1
- package/lib/commonjs/anchors/useUserflowAnchor.js +1 -0
- package/lib/commonjs/anchors/useUserflowAnchor.js.map +1 -1
- package/lib/commonjs/anonymousId.js +19 -7
- package/lib/commonjs/anonymousId.js.map +1 -1
- package/lib/commonjs/authoring/ElementPickerOverlay.js +126 -50
- package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +32 -10
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeButton.js +8 -3
- package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeIcon.js +4 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js +23 -10
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -1
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +19 -12
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -1
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +10 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -1
- 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/tokens.js +7 -6
- package/lib/commonjs/authoring/chrome/tokens.js.map +1 -1
- package/lib/commonjs/authoring/elementPickerController.js.map +1 -1
- package/lib/commonjs/authoring/fingerprintFromInstance.js +204 -4
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/commonjs/authoring/hitTest.js +264 -16
- package/lib/commonjs/authoring/hitTest.js.map +1 -1
- 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/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/themeColor.js +15 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deepLinking.js +4 -4
- 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 +2 -2
- package/lib/commonjs/index.js +123 -43
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/installCheck.js +151 -0
- package/lib/commonjs/installCheck.js.map +1 -0
- package/lib/commonjs/lifecycle.js.map +1 -1
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +14 -11
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/commonjs/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/commonjs/pairing/PairingController.js +245 -27
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +55 -16
- 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 +50 -0
- package/lib/commonjs/pairing/deviceId.js.map +1 -0
- package/lib/commonjs/pairing/diagnostics.js +5 -4
- package/lib/commonjs/pairing/diagnostics.js.map +1 -1
- package/lib/commonjs/pairing/tokenStorage.js +47 -7
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +3 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/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/SdkErrorBoundary.js +61 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/commonjs/runtime/TargetPressBridge.js +31 -13
- 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 +138 -65
- 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/embedBannerRegistry.js +30 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +75 -3
- package/lib/commonjs/runtime/flowEngine.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/screenTracker.js +34 -9
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/storage/asyncStorage.js +67 -0
- package/lib/commonjs/storage/asyncStorage.js.map +1 -0
- 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/MadeWithUserflow.js +12 -8
- package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +17 -1
- 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/resolveBannerTheme.js +22 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/commonjs/surfaces/safeArea.js +76 -13
- package/lib/commonjs/surfaces/safeArea.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AnchorRegistry.js +7 -0
- package/lib/module/anchors/AnchorRegistry.js.map +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/elementConditionEvaluator.js +189 -55
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/module/anchors/elementTapMonitor.js +87 -0
- package/lib/module/anchors/elementTapMonitor.js.map +1 -0
- package/lib/module/anchors/elementTargetMatch.js +78 -0
- package/lib/module/anchors/elementTargetMatch.js.map +1 -0
- 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 +120 -87
- package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/module/anchors/fiber/resolveFiberPath.js +215 -0
- package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/touchTargetFiber.js +100 -0
- package/lib/module/anchors/fiber/touchTargetFiber.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/isInstanceOnVisibleScreen.js +46 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +2 -1
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveAutoAnchorHost.js +25 -18
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveElementTargets.js +152 -0
- package/lib/module/anchors/resolveElementTargets.js.map +1 -0
- package/lib/module/anchors/semanticMatcher.js +26 -9
- package/lib/module/anchors/semanticMatcher.js.map +1 -1
- package/lib/module/anchors/targetPressMonitor.js +8 -3
- package/lib/module/anchors/targetPressMonitor.js.map +1 -1
- package/lib/module/anchors/useUserflowAnchor.js +1 -0
- package/lib/module/anchors/useUserflowAnchor.js.map +1 -1
- package/lib/module/anonymousId.js +18 -6
- package/lib/module/anonymousId.js.map +1 -1
- package/lib/module/authoring/ElementPickerOverlay.js +128 -52
- package/lib/module/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeBottomSheet.js +32 -10
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeButton.js +8 -3
- package/lib/module/authoring/chrome/ChromeButton.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeIcon.js +4 -0
- package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeTopBar.js +23 -10
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -1
- package/lib/module/authoring/chrome/DoubleTapBridge.js +19 -12
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -1
- package/lib/module/authoring/chrome/doubleTapMonitor.js +10 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -1
- 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/tokens.js +7 -6
- package/lib/module/authoring/chrome/tokens.js.map +1 -1
- package/lib/module/authoring/elementPickerController.js.map +1 -1
- package/lib/module/authoring/fingerprintFromInstance.js +198 -4
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/module/authoring/hitTest.js +264 -18
- package/lib/module/authoring/hitTest.js.map +1 -1
- 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/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/themeColor.js +14 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deepLinking.js +4 -4
- 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 +2 -2
- package/lib/module/index.js +119 -45
- package/lib/module/index.js.map +1 -1
- package/lib/module/installCheck.js +139 -0
- package/lib/module/installCheck.js.map +1 -0
- package/lib/module/lifecycle.js.map +1 -1
- package/lib/module/navigation/WithUserflowReactNavigation.js +14 -11
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/module/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/module/pairing/PairingController.js +245 -27
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +54 -16
- 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 +45 -0
- package/lib/module/pairing/deviceId.js.map +1 -0
- package/lib/module/pairing/diagnostics.js +5 -4
- package/lib/module/pairing/diagnostics.js.map +1 -1
- package/lib/module/pairing/tokenStorage.js +47 -7
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +3 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/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/SdkErrorBoundary.js +55 -0
- package/lib/module/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/module/runtime/TargetPressBridge.js +31 -13
- 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 +139 -66
- 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/embedBannerRegistry.js +24 -0
- package/lib/module/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +72 -3
- package/lib/module/runtime/flowEngine.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/screenTracker.js +33 -9
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/storage/asyncStorage.js +61 -0
- package/lib/module/storage/asyncStorage.js.map +1 -0
- 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/MadeWithUserflow.js +11 -7
- package/lib/module/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/module/surfaces/ModalSurface.js +1 -1
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +17 -1
- 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/resolveBannerTheme.js +16 -0
- package/lib/module/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/module/surfaces/safeArea.js +72 -13
- package/lib/module/surfaces/safeArea.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts +7 -0
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +12 -16
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementTapMonitor.d.ts +36 -0
- package/lib/typescript/commonjs/src/anchors/elementTapMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/elementTargetMatch.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/elementTargetMatch.d.ts.map +1 -0
- 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 +21 -8
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- 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/touchTargetFiber.d.ts +24 -0
- package/lib/typescript/commonjs/src/anchors/fiber/touchTargetFiber.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/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 +2 -1
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +10 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveElementTargets.d.ts +39 -0
- package/lib/typescript/commonjs/src/anchors/resolveElementTargets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +6 -4
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anonymousId.d.ts +3 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +1 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +7 -6
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +2 -3
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +57 -2
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +47 -3
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -1
- 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/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/themeColor.d.ts +2 -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/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/index.d.ts +16 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/installCheck.d.ts +33 -0
- package/lib/typescript/commonjs/src/installCheck.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts +4 -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/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +71 -4
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +9 -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 +3 -2
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +14 -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/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 +2 -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 +9 -3
- 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/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/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/screenTracker.d.ts +7 -3
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/storage/asyncStorage.d.ts +15 -0
- package/lib/typescript/commonjs/src/storage/asyncStorage.d.ts.map +1 -0
- 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/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -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/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +9 -1
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts +7 -0
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +12 -16
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementTapMonitor.d.ts +36 -0
- package/lib/typescript/module/src/anchors/elementTapMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/elementTargetMatch.d.ts +20 -0
- package/lib/typescript/module/src/anchors/elementTargetMatch.d.ts.map +1 -0
- 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 +21 -8
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- 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/touchTargetFiber.d.ts +24 -0
- package/lib/typescript/module/src/anchors/fiber/touchTargetFiber.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/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 +2 -1
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +10 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveElementTargets.d.ts +39 -0
- package/lib/typescript/module/src/anchors/resolveElementTargets.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +6 -4
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts +2 -0
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts.map +1 -1
- package/lib/typescript/module/src/anonymousId.d.ts +3 -0
- package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +1 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +7 -6
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts +2 -3
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +57 -2
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hitTest.d.ts +47 -3
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -1
- 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/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/themeColor.d.ts +2 -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/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/index.d.ts +16 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/installCheck.d.ts +33 -0
- package/lib/typescript/module/src/installCheck.d.ts.map +1 -0
- package/lib/typescript/module/src/lifecycle.d.ts +4 -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/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PairingController.d.ts +71 -4
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +9 -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 +3 -2
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +14 -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/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 +2 -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 +9 -3
- 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/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/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/screenTracker.d.ts +7 -3
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/storage/asyncStorage.d.ts +15 -0
- package/lib/typescript/module/src/storage/asyncStorage.d.ts.map +1 -0
- 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/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -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/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts +9 -1
- package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +16 -3
- package/src/anchors/AnchorRegistry.ts +12 -0
- package/src/anchors/AutoAnchorRegistry.ts +41 -11
- package/src/anchors/elementConditionEvaluator.ts +235 -70
- package/src/anchors/elementTapMonitor.ts +95 -0
- package/src/anchors/elementTargetMatch.ts +90 -0
- package/src/anchors/fiber/fiberPath.ts +117 -0
- package/src/anchors/fiber/findAnchorFiber.ts +121 -80
- package/src/anchors/fiber/resolveFiberPath.ts +215 -0
- package/src/anchors/fiber/touchTargetFiber.ts +125 -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/isInstanceOnVisibleScreen.ts +55 -0
- package/src/anchors/resolveAnchorHost.ts +2 -1
- package/src/anchors/resolveAutoAnchorHost.ts +20 -18
- package/src/anchors/resolveElementTargets.ts +165 -0
- package/src/anchors/semanticMatcher.ts +38 -14
- package/src/anchors/targetPressMonitor.ts +12 -3
- package/src/anchors/useUserflowAnchor.ts +1 -0
- package/src/anonymousId.ts +20 -8
- package/src/authoring/ElementPickerOverlay.tsx +168 -59
- package/src/authoring/chrome/ChromeBottomSheet.tsx +49 -8
- package/src/authoring/chrome/ChromeButton.tsx +9 -4
- package/src/authoring/chrome/ChromeIcon.tsx +10 -1
- package/src/authoring/chrome/ChromeTopBar.tsx +39 -15
- package/src/authoring/chrome/DoubleTapBridge.tsx +19 -12
- package/src/authoring/chrome/doubleTapMonitor.ts +10 -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/tokens.ts +7 -2
- package/src/authoring/elementPickerController.ts +2 -4
- package/src/authoring/fingerprintFromInstance.ts +170 -4
- package/src/authoring/hitTest.ts +324 -16
- package/src/authoring/hostAtPoint.ts +247 -0
- package/src/content/BannerStepButton.tsx +91 -0
- package/src/content/buttonAppearance.ts +16 -0
- package/src/content/resolveBannerButtonChrome.ts +49 -0
- package/src/content/themeColor.ts +15 -0
- package/src/content/types.ts +1 -0
- package/src/deepLinking.ts +4 -4
- 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 +2 -2
- package/src/index.ts +139 -45
- package/src/installCheck.ts +191 -0
- package/src/lifecycle.ts +4 -1
- package/src/navigation/WithUserflowReactNavigation.tsx +13 -10
- package/src/navigation/openFlowNavigateUrl.ts +12 -5
- package/src/pairing/PairingController.ts +283 -29
- package/src/pairing/PreviewModeBanner.tsx +71 -14
- package/src/pairing/deepLink.ts +23 -5
- package/src/pairing/deviceId.ts +46 -0
- package/src/pairing/diagnostics.ts +6 -4
- package/src/pairing/tokenStorage.ts +60 -7
- package/src/pairing/usePairingState.ts +2 -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/SdkErrorBoundary.tsx +77 -0
- package/src/runtime/TargetPressBridge.tsx +36 -13
- package/src/runtime/UserflowOverlay.tsx +118 -0
- package/src/runtime/UserflowProvider.tsx +146 -64
- package/src/runtime/bannerEngine.ts +55 -0
- package/src/runtime/bannerEngineContext.ts +5 -0
- package/src/runtime/bannerPlacement.ts +36 -0
- package/src/runtime/embedBannerRegistry.ts +28 -0
- package/src/runtime/flowEngine.ts +76 -3
- package/src/runtime/isolateCall.ts +53 -0
- package/src/runtime/reportSdkError.ts +12 -0
- package/src/runtime/useBannerSession.ts +35 -0
- package/src/screenTracker.ts +34 -8
- package/src/storage/asyncStorage.ts +88 -0
- package/src/surfaces/BannerBar.tsx +176 -0
- package/src/surfaces/BannerSurface.tsx +82 -0
- package/src/surfaces/MadeWithUserflow.tsx +15 -10
- package/src/surfaces/ModalSurface.tsx +1 -1
- package/src/surfaces/TooltipSurface.tsx +17 -1
- 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/resolveBannerTheme.ts +18 -0
- package/src/surfaces/safeArea.ts +88 -19
- package/src/version.ts +1 -1
- 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/constants.d.ts +2 -0
- package/vendor/core/dist/constants.d.ts.map +1 -1
- package/vendor/core/dist/constants.js +2 -0
- package/vendor/core/dist/constants.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/ClientConditionEngine.d.ts +20 -1
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/ClientConditionEngine.js +13 -10
- package/vendor/core/dist/engine/ClientConditionEngine.js.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +41 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.js +167 -28
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +38 -2
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +19 -2
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +10 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +68 -29
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/engine/handleActions.d.ts +17 -3
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +17 -14
- package/vendor/core/dist/engine/handleActions.js.map +1 -1
- package/vendor/core/dist/engine/trackCondition.d.ts +2 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -1
- package/vendor/core/dist/engine/trackCondition.js +4 -2
- package/vendor/core/dist/engine/trackCondition.js.map +1 -1
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +11 -1
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -1
- package/vendor/core/dist/engine/trackStepTriggers.js +42 -16
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -1
- 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 +5 -2
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +1 -0
- package/vendor/core/dist/index.js.map +1 -1
- package/vendor/core/dist/normalizeAttributes.js +9 -7
- package/vendor/core/dist/normalizeAttributes.js.map +1 -1
- 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 +8 -0
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +16 -2
- package/vendor/core/dist/transport/phoenix.js.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/autoData.d.ts +8 -15
- package/vendor/protocol/dist/autoData.d.ts.map +1 -1
- package/vendor/protocol/dist/autoData.js.map +1 -1
- package/vendor/protocol/dist/flows.d.ts +58 -2
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.js +20 -2
- package/vendor/protocol/dist/flows.js.map +1 -1
- package/vendor/protocol/dist/messages.d.ts +22 -12
- package/vendor/protocol/dist/messages.d.ts.map +1 -1
- package/vendor/protocol/dist/messages.js +5 -2
- package/vendor/protocol/dist/messages.js.map +1 -1
- package/vendor/protocol/package.json +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { BannerContentLayout } from '@userflow-tech/protocol';
|
|
4
|
+
import { BANNER_INNER_COLUMN_GAP, BANNER_INNER_MARGIN_HORIZONTAL, BANNER_INNER_ROW_GAP, BANNER_OVERLAY_SCREEN_INSET_HORIZONTAL } from "./bannerBarTokens.js";
|
|
5
|
+
export { BANNER_CLOSE_SLOT_SIZE, BANNER_ROOT_PADDING } from "./bannerBarTokens.js";
|
|
6
|
+
function optionalMargin(value) {
|
|
7
|
+
return value == null ? undefined : value;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** Outer frame: max embed width and builder outer margin (web `userflowjs-banner-frame`). */
|
|
11
|
+
export function bannerFrameStyle(banner) {
|
|
12
|
+
const hasMaxWidth = banner.maxWidth != null;
|
|
13
|
+
return {
|
|
14
|
+
alignSelf: hasMaxWidth ? 'center' : 'stretch',
|
|
15
|
+
...(hasMaxWidth ? {
|
|
16
|
+
maxWidth: banner.maxWidth
|
|
17
|
+
} : null),
|
|
18
|
+
marginTop: optionalMargin(banner.marginTop),
|
|
19
|
+
marginRight: optionalMargin(banner.marginRight),
|
|
20
|
+
marginBottom: optionalMargin(banner.marginBottom),
|
|
21
|
+
marginLeft: optionalMargin(banner.marginLeft)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Corner radius on the painted bar when configured in the builder. */
|
|
26
|
+
export function resolveBannerBarBorderRadius(banner) {
|
|
27
|
+
return banner.borderRadius ?? undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Horizontal inset for overlay hosts — at least Figma inset, or safe area when larger. */
|
|
31
|
+
export function bannerOverlayHostPadding(insets) {
|
|
32
|
+
const horizontal = Math.max(BANNER_OVERLAY_SCREEN_INSET_HORIZONTAL, insets.left, insets.right);
|
|
33
|
+
return {
|
|
34
|
+
paddingHorizontal: horizontal
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Flex justification for the inner row (web content-layout modifiers). */
|
|
39
|
+
export function bannerInnerJustifyContent(layout) {
|
|
40
|
+
switch (layout) {
|
|
41
|
+
case BannerContentLayout.CENTER:
|
|
42
|
+
return 'center';
|
|
43
|
+
case BannerContentLayout.SPACE_BETWEEN:
|
|
44
|
+
return 'space-between';
|
|
45
|
+
case BannerContentLayout.START:
|
|
46
|
+
default:
|
|
47
|
+
return 'flex-start';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export function bannerInnerStyle(banner) {
|
|
51
|
+
const hasMaxContentWidth = banner.maxContentWidth != null;
|
|
52
|
+
return {
|
|
53
|
+
flexGrow: 1,
|
|
54
|
+
flexShrink: 1,
|
|
55
|
+
flexBasis: 0,
|
|
56
|
+
flexDirection: 'row',
|
|
57
|
+
flexWrap: 'wrap',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
columnGap: BANNER_INNER_COLUMN_GAP,
|
|
60
|
+
rowGap: BANNER_INNER_ROW_GAP,
|
|
61
|
+
marginHorizontal: BANNER_INNER_MARGIN_HORIZONTAL,
|
|
62
|
+
justifyContent: bannerInnerJustifyContent(banner.contentLayout),
|
|
63
|
+
...(hasMaxContentWidth ? {
|
|
64
|
+
maxWidth: banner.maxContentWidth,
|
|
65
|
+
width: '100%'
|
|
66
|
+
} : null)
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=bannerBarLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BannerContentLayout","BANNER_INNER_COLUMN_GAP","BANNER_INNER_MARGIN_HORIZONTAL","BANNER_INNER_ROW_GAP","BANNER_OVERLAY_SCREEN_INSET_HORIZONTAL","BANNER_CLOSE_SLOT_SIZE","BANNER_ROOT_PADDING","optionalMargin","value","undefined","bannerFrameStyle","banner","hasMaxWidth","maxWidth","alignSelf","marginTop","marginRight","marginBottom","marginLeft","resolveBannerBarBorderRadius","borderRadius","bannerOverlayHostPadding","insets","horizontal","Math","max","left","right","paddingHorizontal","bannerInnerJustifyContent","layout","CENTER","SPACE_BETWEEN","START","bannerInnerStyle","hasMaxContentWidth","maxContentWidth","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","alignItems","columnGap","rowGap","marginHorizontal","justifyContent","contentLayout","width"],"sourceRoot":"../../../src","sources":["surfaces/bannerBarLayout.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,yBAAyB;AAG7D,SACEC,uBAAuB,EACvBC,8BAA8B,EAC9BC,oBAAoB,EACpBC,sCAAsC,QACjC,sBAAmB;AAG1B,SAASC,sBAAsB,EAAEC,mBAAmB,QAAQ,sBAAmB;AAE/E,SAASC,cAAcA,CAACC,KAAgC,EAAsB;EAC5E,OAAOA,KAAK,IAAI,IAAI,GAAGC,SAAS,GAAGD,KAAK;AAC1C;;AAEA;AACA,OAAO,SAASE,gBAAgBA,CAACC,MAAsB,EAAa;EAClE,MAAMC,WAAW,GAAGD,MAAM,CAACE,QAAQ,IAAI,IAAI;EAE3C,OAAO;IACLC,SAAS,EAAEF,WAAW,GAAG,QAAQ,GAAG,SAAS;IAC7C,IAAIA,WAAW,GAAG;MAAEC,QAAQ,EAAEF,MAAM,CAACE;IAAU,CAAC,GAAG,IAAI,CAAC;IACxDE,SAAS,EAAER,cAAc,CAACI,MAAM,CAACI,SAAS,CAAC;IAC3CC,WAAW,EAAET,cAAc,CAACI,MAAM,CAACK,WAAW,CAAC;IAC/CC,YAAY,EAAEV,cAAc,CAACI,MAAM,CAACM,YAAY,CAAC;IACjDC,UAAU,EAAEX,cAAc,CAACI,MAAM,CAACO,UAAU;EAC9C,CAAC;AACH;;AAEA;AACA,OAAO,SAASC,4BAA4BA,CAACR,MAAsB,EAAsB;EACvF,OAAOA,MAAM,CAACS,YAAY,IAAIX,SAAS;AACzC;;AAEA;AACA,OAAO,SAASY,wBAAwBA,CAACC,MAAkB,EAAa;EACtE,MAAMC,UAAU,GAAGC,IAAI,CAACC,GAAG,CAACrB,sCAAsC,EAAEkB,MAAM,CAACI,IAAI,EAAEJ,MAAM,CAACK,KAAK,CAAC;EAC9F,OAAO;IAAEC,iBAAiB,EAAEL;EAAW,CAAC;AAC1C;;AAEA;AACA,OAAO,SAASM,yBAAyBA,CACvCC,MAA2B,EACE;EAC7B,QAAQA,MAAM;IACZ,KAAK9B,mBAAmB,CAAC+B,MAAM;MAC7B,OAAO,QAAQ;IACjB,KAAK/B,mBAAmB,CAACgC,aAAa;MACpC,OAAO,eAAe;IACxB,KAAKhC,mBAAmB,CAACiC,KAAK;IAC9B;MACE,OAAO,YAAY;EACvB;AACF;AAEA,OAAO,SAASC,gBAAgBA,CAACvB,MAAsB,EAAa;EAClE,MAAMwB,kBAAkB,GAAGxB,MAAM,CAACyB,eAAe,IAAI,IAAI;EACzD,OAAO;IACLC,QAAQ,EAAE,CAAC;IACXC,UAAU,EAAE,CAAC;IACbC,SAAS,EAAE,CAAC;IACZC,aAAa,EAAE,KAAK;IACpBC,QAAQ,EAAE,MAAM;IAChBC,UAAU,EAAE,QAAQ;IACpBC,SAAS,EAAE1C,uBAAuB;IAClC2C,MAAM,EAAEzC,oBAAoB;IAC5B0C,gBAAgB,EAAE3C,8BAA8B;IAChD4C,cAAc,EAAEjB,yBAAyB,CAAClB,MAAM,CAACoC,aAAa,CAAC;IAC/D,IAAIZ,kBAAkB,GAAG;MAAEtB,QAAQ,EAAEF,MAAM,CAACyB,eAAgB;MAAEY,KAAK,EAAE;IAAO,CAAC,GAAG,IAAI;EACtF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* End-user banner chrome from Figma `Userflow - React native`
|
|
5
|
+
* (`BojC6qdlFUytdD1bRsNLV8`, node `1551-1208` — SDK Embed Banner) and web
|
|
6
|
+
* `userflowjs-banner-*` in bubble-frame.styl. Layout numbers match web
|
|
7
|
+
* `$padding-*` at 1rem = 16px.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export const BANNER_ROOT_PADDING = 8;
|
|
11
|
+
export const BANNER_INNER_MARGIN_HORIZONTAL = 8;
|
|
12
|
+
export const BANNER_INNER_COLUMN_GAP = 16;
|
|
13
|
+
export const BANNER_INNER_ROW_GAP = 8;
|
|
14
|
+
export const BANNER_BUTTON_GAP = 8;
|
|
15
|
+
export const BANNER_BUTTON_PADDING_HORIZONTAL = 12;
|
|
16
|
+
/** Web `--userflow-button-height` default (36). Close control is square at this size. */
|
|
17
|
+
export const BANNER_CLOSE_SLOT_SIZE = 36;
|
|
18
|
+
export const BANNER_CLOSE_BORDER_RADIUS = 4;
|
|
19
|
+
|
|
20
|
+
/** Overlay embed: horizontal inset from screen edges (Figma; excludes builder outer margin). */
|
|
21
|
+
export const BANNER_OVERLAY_SCREEN_INSET_HORIZONTAL = 16;
|
|
22
|
+
/** Figma Shadow/Card — separates a full-bleed overlay bar from app content. */
|
|
23
|
+
const BANNER_SHADOW_COLOR = '#132b39';
|
|
24
|
+
export function bannerOverlayShadowStyle(edge) {
|
|
25
|
+
const offsetY = edge === 'top' ? 4 : -4;
|
|
26
|
+
return {
|
|
27
|
+
shadowColor: BANNER_SHADOW_COLOR,
|
|
28
|
+
shadowOffset: {
|
|
29
|
+
width: 0,
|
|
30
|
+
height: offsetY
|
|
31
|
+
},
|
|
32
|
+
shadowOpacity: 0.1,
|
|
33
|
+
shadowRadius: 12,
|
|
34
|
+
elevation: 8
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=bannerBarTokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BANNER_ROOT_PADDING","BANNER_INNER_MARGIN_HORIZONTAL","BANNER_INNER_COLUMN_GAP","BANNER_INNER_ROW_GAP","BANNER_BUTTON_GAP","BANNER_BUTTON_PADDING_HORIZONTAL","BANNER_CLOSE_SLOT_SIZE","BANNER_CLOSE_BORDER_RADIUS","BANNER_OVERLAY_SCREEN_INSET_HORIZONTAL","BANNER_SHADOW_COLOR","bannerOverlayShadowStyle","edge","offsetY","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation"],"sourceRoot":"../../../src","sources":["surfaces/bannerBarTokens.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,mBAAmB,GAAG,CAAC;AACpC,OAAO,MAAMC,8BAA8B,GAAG,CAAC;AAC/C,OAAO,MAAMC,uBAAuB,GAAG,EAAE;AACzC,OAAO,MAAMC,oBAAoB,GAAG,CAAC;AACrC,OAAO,MAAMC,iBAAiB,GAAG,CAAC;AAClC,OAAO,MAAMC,gCAAgC,GAAG,EAAE;AAClD;AACA,OAAO,MAAMC,sBAAsB,GAAG,EAAE;AACxC,OAAO,MAAMC,0BAA0B,GAAG,CAAC;;AAE3C;AACA,OAAO,MAAMC,sCAAsC,GAAG,EAAE;AACxD;AACA,MAAMC,mBAAmB,GAAG,SAAS;AAErC,OAAO,SAASC,wBAAwBA,CAACC,IAAsB,EAAa;EAC1E,MAAMC,OAAO,GAAGD,IAAI,KAAK,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC;EACvC,OAAO;IACLE,WAAW,EAAEJ,mBAAmB;IAChCK,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAEJ;IAAQ,CAAC;IAC3CK,aAAa,EAAE,GAAG;IAClBC,YAAY,EAAE,EAAE;IAChBC,SAAS,EAAE;EACb,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { DEFAULT_SERVER_ENDPOINT, genSessionDataLookup } from '@userflow-tech/core';
|
|
4
|
+
import { BannerEmbedMode, EndFlowReasonInput } from '@userflow-tech/protocol';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { Animated, Platform, useColorScheme, useWindowDimensions, View } from 'react-native';
|
|
7
|
+
import { buildBootstrapHtml, EVAL_JS_BASE_URL, isBootstrapUrl } from "../../evalJs/bootstrap.js";
|
|
8
|
+
import { parseBridgeMessage } from "../../evalJs/bridgeMessages.js";
|
|
9
|
+
import { formatEvalJsError, getEvalJsBridgeHandlers } from "../../evalJs/evalJsBridge.js";
|
|
10
|
+
import { evalJsController } from "../../evalJs/evalJsController.js";
|
|
11
|
+
import { getEvalJsWebView } from "../../evalJs/getWebView.js";
|
|
12
|
+
import { injectEvalPendingIntoWebView } from "../../evalJs/injectEvalPending.js";
|
|
13
|
+
import { useEvalJsWebViewInjection } from "../../evalJs/useEvalJsWebViewInjection.js";
|
|
14
|
+
import { getUserflowCore } from "../../runtime/userflowCore.js";
|
|
15
|
+
import { getCurrentScreenLocation, subscribeScreenLocation } from "../../screenTracker.js";
|
|
16
|
+
import { bannerFrameStyle, bannerInnerStyle, resolveBannerBarBorderRadius } from "../bannerBarLayout.js";
|
|
17
|
+
import { bannerOverlayShadowStyle } from "../bannerBarTokens.js";
|
|
18
|
+
import { useUserflowSafeAreaInsets } from "../safeArea.js";
|
|
19
|
+
import { collectBannerAutoRunEvalCodes } from "./bannerAutoRunEvalJs.js";
|
|
20
|
+
import { markBannerAutoRunEvalComplete, shouldSkipBannerAutoRunEval } from "./bannerAutoRunSession.js";
|
|
21
|
+
import { buildCustomBannerBodyHtml } from "./buildCustomBannerHtml.js";
|
|
22
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
function screenFromLocation(location) {
|
|
24
|
+
if (!location) {
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
if ('path' in location) {
|
|
28
|
+
return location.path ? {
|
|
29
|
+
path: location.path
|
|
30
|
+
} : {};
|
|
31
|
+
}
|
|
32
|
+
return location.screen ? {
|
|
33
|
+
name: location.screen
|
|
34
|
+
} : {};
|
|
35
|
+
}
|
|
36
|
+
function useEvalJsScreen() {
|
|
37
|
+
const [screen, setScreen] = React.useState(() => screenFromLocation(getCurrentScreenLocation()));
|
|
38
|
+
React.useEffect(() => {
|
|
39
|
+
return subscribeScreenLocation(location => {
|
|
40
|
+
setScreen(screenFromLocation(location));
|
|
41
|
+
});
|
|
42
|
+
}, []);
|
|
43
|
+
return screen;
|
|
44
|
+
}
|
|
45
|
+
export function BannerWebViewBar({
|
|
46
|
+
session,
|
|
47
|
+
onActions,
|
|
48
|
+
onDismiss
|
|
49
|
+
}) {
|
|
50
|
+
const banner = session.version.banner;
|
|
51
|
+
const WebView = getEvalJsWebView();
|
|
52
|
+
const webRef = React.useRef(null);
|
|
53
|
+
const [pageReady, setPageReady] = React.useState(false);
|
|
54
|
+
const [contentHeight, setContentHeight] = React.useState(56);
|
|
55
|
+
const colorScheme = useColorScheme();
|
|
56
|
+
const viewport = useWindowDimensions();
|
|
57
|
+
const insets = useUserflowSafeAreaInsets();
|
|
58
|
+
const screen = useEvalJsScreen();
|
|
59
|
+
const lookupAttribute = React.useMemo(() => genSessionDataLookup(session.data), [session.data]);
|
|
60
|
+
const evalSnapshot = React.useSyncExternalStore(evalJsController.subscribe, evalJsController.getSnapshot, evalJsController.getSnapshot);
|
|
61
|
+
const host = evalSnapshot.host;
|
|
62
|
+
const context = React.useMemo(() => ({
|
|
63
|
+
platform: Platform.OS,
|
|
64
|
+
colorScheme: colorScheme === 'dark' ? 'dark' : 'light',
|
|
65
|
+
safeAreaInsets: insets,
|
|
66
|
+
viewport: {
|
|
67
|
+
width: viewport.width,
|
|
68
|
+
height: viewport.height
|
|
69
|
+
},
|
|
70
|
+
screen,
|
|
71
|
+
host
|
|
72
|
+
}), [colorScheme, host, insets, screen, viewport.height, viewport.width]);
|
|
73
|
+
const serverEndpoint = getUserflowCore().getServerEndpoint() ?? DEFAULT_SERVER_ENDPOINT;
|
|
74
|
+
const skipAutoRunEval = shouldSkipBannerAutoRunEval(session.id);
|
|
75
|
+
const initialContext = React.useRef(context);
|
|
76
|
+
const html = React.useMemo(() => {
|
|
77
|
+
const body = buildCustomBannerBodyHtml(session, lookupAttribute, serverEndpoint, {
|
|
78
|
+
skipAutoRunEval
|
|
79
|
+
});
|
|
80
|
+
return buildBootstrapHtml(initialContext.current, body);
|
|
81
|
+
}, [lookupAttribute, serverEndpoint, session, skipAutoRunEval]);
|
|
82
|
+
const opacity = React.useRef(new Animated.Value(banner?.animate ? 0 : 1)).current;
|
|
83
|
+
React.useEffect(() => {
|
|
84
|
+
if (!banner?.animate) {
|
|
85
|
+
opacity.setValue(1);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
opacity.setValue(0);
|
|
89
|
+
const animation = Animated.timing(opacity, {
|
|
90
|
+
toValue: 1,
|
|
91
|
+
duration: 200,
|
|
92
|
+
useNativeDriver: true
|
|
93
|
+
});
|
|
94
|
+
animation.start();
|
|
95
|
+
return () => {
|
|
96
|
+
animation.stop();
|
|
97
|
+
};
|
|
98
|
+
}, [banner?.animate, opacity, session.id]);
|
|
99
|
+
React.useEffect(() => {
|
|
100
|
+
setPageReady(false);
|
|
101
|
+
setContentHeight(56);
|
|
102
|
+
}, [session.id, html]);
|
|
103
|
+
React.useEffect(() => {
|
|
104
|
+
if (!pageReady || skipAutoRunEval || !banner) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (collectBannerAutoRunEvalCodes(banner, lookupAttribute).length === 0) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
markBannerAutoRunEvalComplete(session.id);
|
|
111
|
+
}, [banner, lookupAttribute, pageReady, session.id, skipAutoRunEval]);
|
|
112
|
+
useEvalJsWebViewInjection(webRef, {
|
|
113
|
+
pageReady,
|
|
114
|
+
context,
|
|
115
|
+
pendingCount: evalSnapshot.pendingCount
|
|
116
|
+
});
|
|
117
|
+
const openExternal = React.useCallback(url => {
|
|
118
|
+
if (!url || isBootstrapUrl(url)) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
getEvalJsBridgeHandlers().openUrl(url);
|
|
122
|
+
}, []);
|
|
123
|
+
const onMessage = React.useCallback(event => {
|
|
124
|
+
let parsed = event.nativeEvent.data;
|
|
125
|
+
if (typeof parsed === 'string') {
|
|
126
|
+
try {
|
|
127
|
+
parsed = JSON.parse(parsed);
|
|
128
|
+
} catch {
|
|
129
|
+
parsed = null;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (parsed != null && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
133
|
+
const record = parsed;
|
|
134
|
+
if (record.__userflow === 1 && record.type === 'bannerLayout') {
|
|
135
|
+
const height = record.height;
|
|
136
|
+
if (typeof height === 'number' && height > 0) {
|
|
137
|
+
const maxHeight = Math.floor(viewport.height * 0.92);
|
|
138
|
+
const next = Math.min(Math.ceil(height), maxHeight);
|
|
139
|
+
setContentHeight(prev => Math.abs(next - prev) <= 1 ? prev : next);
|
|
140
|
+
}
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (record.__userflow === 1 && record.type === 'bannerButton') {
|
|
144
|
+
const buttonId = record.buttonId;
|
|
145
|
+
if (typeof buttonId === 'string' && banner) {
|
|
146
|
+
const button = banner.buttons.find(entry => entry.id === buttonId);
|
|
147
|
+
if (button) {
|
|
148
|
+
void Promise.resolve(onActions(button.actions)).then(() => {
|
|
149
|
+
injectEvalPendingIntoWebView(webRef.current);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (record.__userflow === 1 && record.type === 'bannerDismiss') {
|
|
156
|
+
webRef.current?.injectJavaScript('window.__userflowBannerEvalDismissed=true;true;');
|
|
157
|
+
onDismiss(EndFlowReasonInput.USER_CLOSED);
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const message = parseBridgeMessage(event.nativeEvent.data);
|
|
162
|
+
if (!message) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
const bridge = getEvalJsBridgeHandlers();
|
|
166
|
+
switch (message.type) {
|
|
167
|
+
case 'ready':
|
|
168
|
+
setPageReady(true);
|
|
169
|
+
webRef.current?.injectJavaScript('window.__userflowBannerLayout&&window.__userflowBannerLayout();true;');
|
|
170
|
+
return;
|
|
171
|
+
case 'close':
|
|
172
|
+
webRef.current?.injectJavaScript('window.__userflowBannerEvalDismissed=true;true;');
|
|
173
|
+
onDismiss(EndFlowReasonInput.USER_CLOSED);
|
|
174
|
+
return;
|
|
175
|
+
case 'endFlow':
|
|
176
|
+
webRef.current?.injectJavaScript('window.__userflowBannerEvalDismissed=true;true;');
|
|
177
|
+
onDismiss(EndFlowReasonInput.USER_CLOSED);
|
|
178
|
+
return;
|
|
179
|
+
case 'setLayout':
|
|
180
|
+
evalJsController.setLayout(message.layout);
|
|
181
|
+
return;
|
|
182
|
+
case 'track':
|
|
183
|
+
bridge.track(message.name, message.attributes);
|
|
184
|
+
return;
|
|
185
|
+
case 'updateUser':
|
|
186
|
+
bridge.updateUser(message.attributes);
|
|
187
|
+
return;
|
|
188
|
+
case 'updateGroup':
|
|
189
|
+
bridge.updateGroup(message.attributes, message.options);
|
|
190
|
+
return;
|
|
191
|
+
case 'openUrl':
|
|
192
|
+
bridge.openUrl(message.url);
|
|
193
|
+
return;
|
|
194
|
+
case 'error':
|
|
195
|
+
bridge.warn(formatEvalJsError(message.message, message.code));
|
|
196
|
+
return;
|
|
197
|
+
default:
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
}, [banner, onActions, onDismiss, viewport.height]);
|
|
201
|
+
if (!banner || !WebView) {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
const overlay = banner.overlay !== false;
|
|
205
|
+
const frameStyle = bannerFrameStyle(banner);
|
|
206
|
+
const innerStyle = bannerInnerStyle(banner);
|
|
207
|
+
const overlayEdge = banner.embedMode === BannerEmbedMode.BODY_LAST ? 'bottom' : 'top';
|
|
208
|
+
const barRadius = resolveBannerBarBorderRadius(banner);
|
|
209
|
+
const webStyle = {
|
|
210
|
+
width: '100%',
|
|
211
|
+
height: contentHeight,
|
|
212
|
+
backgroundColor: 'transparent'
|
|
213
|
+
};
|
|
214
|
+
const debugging = typeof __DEV__ !== 'undefined' && __DEV__ ? true : undefined;
|
|
215
|
+
return /*#__PURE__*/_jsx(View, {
|
|
216
|
+
testID: "userflow-banner-frame",
|
|
217
|
+
style: frameStyle,
|
|
218
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
219
|
+
style: [{
|
|
220
|
+
opacity
|
|
221
|
+
}, overlay ? bannerOverlayShadowStyle(overlayEdge) : null],
|
|
222
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
223
|
+
testID: "userflow-banner-webview",
|
|
224
|
+
style: [{
|
|
225
|
+
borderRadius: barRadius ?? 0,
|
|
226
|
+
overflow: 'hidden'
|
|
227
|
+
}, innerStyle.maxWidth != null ? {
|
|
228
|
+
maxWidth: innerStyle.maxWidth
|
|
229
|
+
} : null],
|
|
230
|
+
children: /*#__PURE__*/_jsx(WebView, {
|
|
231
|
+
ref: webRef,
|
|
232
|
+
source: {
|
|
233
|
+
html,
|
|
234
|
+
baseUrl: EVAL_JS_BASE_URL
|
|
235
|
+
},
|
|
236
|
+
style: webStyle,
|
|
237
|
+
javaScriptEnabled: true,
|
|
238
|
+
domStorageEnabled: true,
|
|
239
|
+
scrollEnabled: false,
|
|
240
|
+
bounces: false,
|
|
241
|
+
showsHorizontalScrollIndicator: false,
|
|
242
|
+
showsVerticalScrollIndicator: false,
|
|
243
|
+
originWhitelist: ['*'],
|
|
244
|
+
setSupportMultipleWindows: false,
|
|
245
|
+
androidLayerType: "hardware",
|
|
246
|
+
...(debugging !== undefined ? {
|
|
247
|
+
webviewDebuggingEnabled: debugging
|
|
248
|
+
} : {}),
|
|
249
|
+
onMessage: onMessage,
|
|
250
|
+
onLoadEnd: () => {
|
|
251
|
+
setPageReady(true);
|
|
252
|
+
webRef.current?.injectJavaScript('window.__userflowBannerLayout&&window.__userflowBannerLayout();true;');
|
|
253
|
+
},
|
|
254
|
+
onShouldStartLoadWithRequest: request => {
|
|
255
|
+
if (isBootstrapUrl(request.url)) {
|
|
256
|
+
return true;
|
|
257
|
+
}
|
|
258
|
+
openExternal(request.url);
|
|
259
|
+
return false;
|
|
260
|
+
},
|
|
261
|
+
onOpenWindow: event => {
|
|
262
|
+
const url = event.nativeEvent.targetUrl;
|
|
263
|
+
if (url) {
|
|
264
|
+
openExternal(url);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
})
|
|
268
|
+
})
|
|
269
|
+
})
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
//# sourceMappingURL=BannerWebViewBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_SERVER_ENDPOINT","genSessionDataLookup","BannerEmbedMode","EndFlowReasonInput","React","Animated","Platform","useColorScheme","useWindowDimensions","View","buildBootstrapHtml","EVAL_JS_BASE_URL","isBootstrapUrl","parseBridgeMessage","formatEvalJsError","getEvalJsBridgeHandlers","evalJsController","getEvalJsWebView","injectEvalPendingIntoWebView","useEvalJsWebViewInjection","getUserflowCore","getCurrentScreenLocation","subscribeScreenLocation","bannerFrameStyle","bannerInnerStyle","resolveBannerBarBorderRadius","bannerOverlayShadowStyle","useUserflowSafeAreaInsets","collectBannerAutoRunEvalCodes","markBannerAutoRunEvalComplete","shouldSkipBannerAutoRunEval","buildCustomBannerBodyHtml","jsx","_jsx","screenFromLocation","location","path","screen","name","useEvalJsScreen","setScreen","useState","useEffect","BannerWebViewBar","session","onActions","onDismiss","banner","version","WebView","webRef","useRef","pageReady","setPageReady","contentHeight","setContentHeight","colorScheme","viewport","insets","lookupAttribute","useMemo","data","evalSnapshot","useSyncExternalStore","subscribe","getSnapshot","host","context","platform","OS","safeAreaInsets","width","height","serverEndpoint","getServerEndpoint","skipAutoRunEval","id","initialContext","html","body","current","opacity","Value","animate","setValue","animation","timing","toValue","duration","useNativeDriver","start","stop","length","pendingCount","openExternal","useCallback","url","openUrl","onMessage","event","parsed","nativeEvent","JSON","parse","Array","isArray","record","__userflow","type","maxHeight","Math","floor","next","min","ceil","prev","abs","buttonId","button","buttons","find","entry","Promise","resolve","actions","then","injectJavaScript","USER_CLOSED","message","bridge","setLayout","layout","track","attributes","updateUser","updateGroup","options","warn","code","overlay","frameStyle","innerStyle","overlayEdge","embedMode","BODY_LAST","barRadius","webStyle","backgroundColor","debugging","__DEV__","undefined","testID","style","children","borderRadius","overflow","maxWidth","ref","source","baseUrl","javaScriptEnabled","domStorageEnabled","scrollEnabled","bounces","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","originWhitelist","setSupportMultipleWindows","androidLayerType","webviewDebuggingEnabled","onLoadEnd","onShouldStartLoadWithRequest","request","onOpenWindow","targetUrl"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/BannerWebViewBar.tsx"],"mappings":";;AAAA,SAASA,uBAAuB,EAAEC,oBAAoB,QAAQ,qBAAqB;AAEnF,SACEC,eAAe,EACfC,kBAAkB,QAEb,yBAAyB;AAChC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,QAAQ,EACRC,cAAc,EACdC,mBAAmB,EACnBC,IAAI,QAEC,cAAc;AAErB,SAASC,kBAAkB,EAAEC,gBAAgB,EAAEC,cAAc,QAAQ,2BAAwB;AAC7F,SAASC,kBAAkB,QAAQ,gCAA6B;AAChE,SAASC,iBAAiB,EAAEC,uBAAuB,QAAQ,8BAA2B;AACtF,SAASC,gBAAgB,QAAQ,kCAA+B;AAChE,SAASC,gBAAgB,QAAkC,4BAAyB;AACpF,SAASC,4BAA4B,QAAQ,mCAAgC;AAE7E,SAASC,yBAAyB,QAAQ,2CAAwC;AAClF,SAASC,eAAe,QAAQ,+BAA4B;AAC5D,SAASC,wBAAwB,EAAEC,uBAAuB,QAAQ,wBAAqB;AACvF,SACEC,gBAAgB,EAChBC,gBAAgB,EAChBC,4BAA4B,QACvB,uBAAoB;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1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { interpolateVariables } from '@userflow-tech/core';
|
|
4
|
+
import { FlowActionType } from '@userflow-tech/protocol';
|
|
5
|
+
function buttonIsEvalJsOnly(button) {
|
|
6
|
+
const actions = button.actions.filter(action => action.type != null);
|
|
7
|
+
if (actions.length === 0) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
return actions.every(action => action.type === FlowActionType.EVAL_JS);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Evaluate JavaScript bodies from buttons whose **only** actions are EVAL_JS.
|
|
15
|
+
* Auto-run once when the WebView loads; click still runs the button action list.
|
|
16
|
+
*/
|
|
17
|
+
export function collectBannerAutoRunEvalCodes(banner, lookupAttribute) {
|
|
18
|
+
const codes = [];
|
|
19
|
+
const seen = new Set();
|
|
20
|
+
for (const button of banner.buttons) {
|
|
21
|
+
if (!buttonIsEvalJsOnly(button)) {
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
for (const action of button.actions) {
|
|
25
|
+
if (action.type !== FlowActionType.EVAL_JS) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
const raw = action.code ?? '';
|
|
29
|
+
if (!raw.trim()) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const code = interpolateVariables(raw, lookupAttribute);
|
|
33
|
+
if (seen.has(code)) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
seen.add(code);
|
|
37
|
+
codes.push(code);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return codes;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=bannerAutoRunEvalJs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["interpolateVariables","FlowActionType","buttonIsEvalJsOnly","button","actions","filter","action","type","length","every","EVAL_JS","collectBannerAutoRunEvalCodes","banner","lookupAttribute","codes","seen","Set","buttons","raw","code","trim","has","add","push"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/bannerAutoRunEvalJs.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,qBAAqB;AAE1D,SAASC,cAAc,QAAQ,yBAAyB;AAExD,SAASC,kBAAkBA,CAACC,MAAyC,EAAW;EAC9E,MAAMC,OAAO,GAAGD,MAAM,CAACC,OAAO,CAACC,MAAM,CAAEC,MAAM,IAAKA,MAAM,CAACC,IAAI,IAAI,IAAI,CAAC;EACtE,IAAIH,OAAO,CAACI,MAAM,KAAK,CAAC,EAAE;IACxB,OAAO,KAAK;EACd;EACA,OAAOJ,OAAO,CAACK,KAAK,CAAEH,MAAM,IAAKA,MAAM,CAACC,IAAI,KAAKN,cAAc,CAACS,OAAO,CAAC;AAC1E;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,6BAA6BA,CAC3CC,MAAsB,EACtBC,eAA+C,EACrC;EACV,MAAMC,KAAe,GAAG,EAAE;EAC1B,MAAMC,IAAI,GAAG,IAAIC,GAAG,CAAS,CAAC;EAC9B,KAAK,MAAMb,MAAM,IAAIS,MAAM,CAACK,OAAO,EAAE;IACnC,IAAI,CAACf,kBAAkB,CAACC,MAAM,CAAC,EAAE;MAC/B;IACF;IACA,KAAK,MAAMG,MAAM,IAAIH,MAAM,CAACC,OAAO,EAAE;MACnC,IAAIE,MAAM,CAACC,IAAI,KAAKN,cAAc,CAACS,OAAO,EAAE;QAC1C;MACF;MACA,MAAMQ,GAAG,GAAGZ,MAAM,CAACa,IAAI,IAAI,EAAE;MAC7B,IAAI,CAACD,GAAG,CAACE,IAAI,CAAC,CAAC,EAAE;QACf;MACF;MACA,MAAMD,IAAI,GAAGnB,oBAAoB,CAACkB,GAAG,EAAEL,eAAe,CAAC;MACvD,IAAIE,IAAI,CAACM,GAAG,CAACF,IAAI,CAAC,EAAE;QAClB;MACF;MACAJ,IAAI,CAACO,GAAG,CAACH,IAAI,CAAC;MACdL,KAAK,CAACS,IAAI,CAACJ,IAAI,CAAC;IAClB;EACF;EACA,OAAOL,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** Banner session ids whose eval-only auto-run already ran (survives temporary WebView unmount). */
|
|
4
|
+
const autoRunCompletedSessionIds = new Set();
|
|
5
|
+
export function shouldSkipBannerAutoRunEval(sessionId) {
|
|
6
|
+
return autoRunCompletedSessionIds.has(sessionId);
|
|
7
|
+
}
|
|
8
|
+
export function markBannerAutoRunEvalComplete(sessionId) {
|
|
9
|
+
autoRunCompletedSessionIds.add(sessionId);
|
|
10
|
+
}
|
|
11
|
+
export function clearBannerAutoRunEvalSession(sessionId) {
|
|
12
|
+
autoRunCompletedSessionIds.delete(sessionId);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export function resetBannerAutoRunSessionsForTests() {
|
|
17
|
+
autoRunCompletedSessionIds.clear();
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=bannerAutoRunSession.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["autoRunCompletedSessionIds","Set","shouldSkipBannerAutoRunEval","sessionId","has","markBannerAutoRunEvalComplete","add","clearBannerAutoRunEvalSession","delete","resetBannerAutoRunSessionsForTests","clear"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/bannerAutoRunSession.ts"],"mappings":";;AAAA;AACA,MAAMA,0BAA0B,GAAG,IAAIC,GAAG,CAAS,CAAC;AAEpD,OAAO,SAASC,2BAA2BA,CAACC,SAAiB,EAAW;EACtE,OAAOH,0BAA0B,CAACI,GAAG,CAACD,SAAS,CAAC;AAClD;AAEA,OAAO,SAASE,6BAA6BA,CAACF,SAAiB,EAAQ;EACrEH,0BAA0B,CAACM,GAAG,CAACH,SAAS,CAAC;AAC3C;AAEA,OAAO,SAASI,6BAA6BA,CAACJ,SAAiB,EAAQ;EACrEH,0BAA0B,CAACQ,MAAM,CAACL,SAAS,CAAC;AAC9C;;AAEA;AACA,OAAO,SAASM,kCAAkCA,CAAA,EAAS;EACzDT,0BAA0B,CAACU,KAAK,CAAC,CAAC;AACpC","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { FlowActionType } from '@userflow-tech/protocol';
|
|
4
|
+
import { themeHasPublishedCustomCss } from "./resolveCdnHost.js";
|
|
5
|
+
let debugForceWebViewBanner = false;
|
|
6
|
+
|
|
7
|
+
/** POC / local testing when the builder flag is not on the wire yet. */
|
|
8
|
+
export function setDebugForceWebViewBanner(enabled) {
|
|
9
|
+
debugForceWebViewBanner = enabled;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export function resetDebugForceWebViewBannerForTests() {
|
|
14
|
+
debugForceWebViewBanner = false;
|
|
15
|
+
}
|
|
16
|
+
function bannerHasEvalJsAction(banner) {
|
|
17
|
+
return banner.buttons.some(button => button.actions.some(action => action.type === FlowActionType.EVAL_JS));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Use the WebView banner renderer when any button runs Evaluate JavaScript
|
|
22
|
+
* (needs the shared eval page), when the theme has published custom CSS
|
|
23
|
+
* (`.userflow-custom-container-*` / `.userflow-custom-button-*` via CDN),
|
|
24
|
+
* or when {@link setDebugForceWebViewBanner} is true.
|
|
25
|
+
*/
|
|
26
|
+
export function bannerNeedsWebView(banner, theme) {
|
|
27
|
+
if (debugForceWebViewBanner) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
if (theme != null && themeHasPublishedCustomCss(theme)) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
return bannerHasEvalJsAction(banner);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=bannerNeedsWebView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FlowActionType","themeHasPublishedCustomCss","debugForceWebViewBanner","setDebugForceWebViewBanner","enabled","resetDebugForceWebViewBannerForTests","bannerHasEvalJsAction","banner","buttons","some","button","actions","action","type","EVAL_JS","bannerNeedsWebView","theme"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/bannerNeedsWebView.ts"],"mappings":";;AACA,SAASA,cAAc,QAAQ,yBAAyB;AAExD,SAASC,0BAA0B,QAAQ,qBAAkB;AAE7D,IAAIC,uBAAuB,GAAG,KAAK;;AAEnC;AACA,OAAO,SAASC,0BAA0BA,CAACC,OAAgB,EAAQ;EACjEF,uBAAuB,GAAGE,OAAO;AACnC;;AAEA;AACA,OAAO,SAASC,oCAAoCA,CAAA,EAAS;EAC3DH,uBAAuB,GAAG,KAAK;AACjC;AAEA,SAASI,qBAAqBA,CAACC,MAAsB,EAAW;EAC9D,OAAOA,MAAM,CAACC,OAAO,CAACC,IAAI,CAAEC,MAAM,IAChCA,MAAM,CAACC,OAAO,CAACF,IAAI,CAAEG,MAAM,IAAKA,MAAM,CAACC,IAAI,KAAKb,cAAc,CAACc,OAAO,CACxE,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAACR,MAAsB,EAAES,KAA4B,EAAW;EAChG,IAAId,uBAAuB,EAAE;IAC3B,OAAO,IAAI;EACb;EACA,IAAIc,KAAK,IAAI,IAAI,IAAIf,0BAA0B,CAACe,KAAK,CAAC,EAAE;IACtD,OAAO,IAAI;EACb;EACA,OAAOV,qBAAqB,CAACC,MAAM,CAAC;AACtC","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { resolveBannerBackgroundColor, resolveBannerForegroundColor } from "../resolveBannerTheme.js";
|
|
4
|
+
function readString(theme, key, fallback) {
|
|
5
|
+
const value = theme[key];
|
|
6
|
+
if (typeof value === 'string' && value.trim()) {
|
|
7
|
+
return value.trim();
|
|
8
|
+
}
|
|
9
|
+
return fallback;
|
|
10
|
+
}
|
|
11
|
+
function readNumber(theme, key, fallback) {
|
|
12
|
+
const value = theme[key];
|
|
13
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
if (typeof value === 'string') {
|
|
17
|
+
const parsed = parseFloat(value);
|
|
18
|
+
if (Number.isFinite(parsed)) {
|
|
19
|
+
return parsed;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return fallback;
|
|
23
|
+
}
|
|
24
|
+
function readCssLength(theme, key, fallbackPx) {
|
|
25
|
+
const value = theme[key];
|
|
26
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
27
|
+
return `${value}px`;
|
|
28
|
+
}
|
|
29
|
+
if (typeof value === 'string' && value.trim()) {
|
|
30
|
+
return value.trim();
|
|
31
|
+
}
|
|
32
|
+
return `${fallbackPx}px`;
|
|
33
|
+
}
|
|
34
|
+
function escapeHtmlAttribute(value) {
|
|
35
|
+
return value.replace(/&/g, '&').replace(/"/g, '"');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Inline CSS custom properties for banner WebView (subset of web `getThemeRootStyles`). */
|
|
39
|
+
export function bannerThemeInlineStyles(theme) {
|
|
40
|
+
const bannerBg = resolveBannerBackgroundColor(theme);
|
|
41
|
+
const bannerFg = resolveBannerForegroundColor(theme);
|
|
42
|
+
const fontSize = typeof theme.fontSize === 'number' ? theme.fontSize : 16;
|
|
43
|
+
const lineHeight = readNumber(theme, 'lineHeight', Math.round(fontSize * 1.5));
|
|
44
|
+
return {
|
|
45
|
+
'--userflow-banner-background-color': bannerBg,
|
|
46
|
+
'--userflow-banner-foreground-color': bannerFg,
|
|
47
|
+
'--userflow-banner-hover-background-color': readString(theme, 'bannerHoverBackgroundColor', bannerBg),
|
|
48
|
+
'--userflow-banner-active-background-color': readString(theme, 'bannerActiveBackgroundColor', bannerBg),
|
|
49
|
+
'--userflow-banner-hover-foreground-color': readString(theme, 'bannerHoverForegroundColor', bannerFg),
|
|
50
|
+
'--userflow-banner-active-foreground-color': readString(theme, 'bannerActiveForegroundColor', bannerFg),
|
|
51
|
+
'--userflow-font-family': readString(theme, 'fontFamily', 'system-ui, sans-serif'),
|
|
52
|
+
'--userflow-font-size': `${fontSize}px`,
|
|
53
|
+
'--userflow-line-height': `${lineHeight}px`,
|
|
54
|
+
'--userflow-button-height': readCssLength(theme, 'buttonHeight', 32),
|
|
55
|
+
'--userflow-button-border-radius': readCssLength(theme, 'buttonBorderRadius', 6),
|
|
56
|
+
'--userflow-button-min-width': readCssLength(theme, 'buttonMinWidth', 0),
|
|
57
|
+
'--userflow-main-foreground-color': bannerFg,
|
|
58
|
+
'--userflow-link-color': readString(theme, 'linkColor', bannerFg),
|
|
59
|
+
'--userflow-h1-font-size': `${Math.round(fontSize * 1.25)}px`,
|
|
60
|
+
'--userflow-h2-font-size': `${Math.round(fontSize * 1.125)}px`,
|
|
61
|
+
'--userflow-font-weight-normal': '400',
|
|
62
|
+
'--userflow-font-weight-bold': '600'
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export function bannerThemeStyleAttribute(theme) {
|
|
66
|
+
const entries = bannerThemeInlineStyles(theme);
|
|
67
|
+
return Object.entries(entries).map(([key, value]) => `${key}:${escapeHtmlAttribute(value)}`).join(';');
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=bannerThemeStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveBannerBackgroundColor","resolveBannerForegroundColor","readString","theme","key","fallback","value","trim","readNumber","Number","isFinite","parsed","parseFloat","readCssLength","fallbackPx","escapeHtmlAttribute","replace","bannerThemeInlineStyles","bannerBg","bannerFg","fontSize","lineHeight","Math","round","bannerThemeStyleAttribute","entries","Object","map","join"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/bannerThemeStyles.ts"],"mappings":";;AAEA,SAASA,4BAA4B,EAAEC,4BAA4B,QAAQ,0BAAu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