@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,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Banner + bubble-button subset of web `bubble-frame.styl` for custom-banner WebViews.
|
|
5
|
+
* Custom theme CSS targets the same class names as userflow.js.
|
|
6
|
+
*/
|
|
7
|
+
export const BANNER_WEB_FRAME_CSS = `
|
|
8
|
+
.userflowjs-theme-root {
|
|
9
|
+
line-height: var(--userflow-line-height, 24px);
|
|
10
|
+
color: var(--userflow-main-foreground-color, inherit);
|
|
11
|
+
font-weight: var(--userflow-font-weight-normal, 400);
|
|
12
|
+
}
|
|
13
|
+
.userflowjs-theme-root, .userflowjs-theme-root button {
|
|
14
|
+
font-family: var(--userflow-font-family, system-ui, sans-serif);
|
|
15
|
+
font-size: var(--userflow-font-size, 16px);
|
|
16
|
+
}
|
|
17
|
+
.userflowjs-theme-root b, .userflowjs-theme-root strong {
|
|
18
|
+
font-weight: var(--userflow-font-weight-bold, 600);
|
|
19
|
+
}
|
|
20
|
+
.userflowjs-theme-root a {
|
|
21
|
+
color: var(--userflow-link-color, inherit);
|
|
22
|
+
text-decoration: underline;
|
|
23
|
+
}
|
|
24
|
+
.userflowjs-theme-root h1 {
|
|
25
|
+
font-size: var(--userflow-h1-font-size, 1.25em);
|
|
26
|
+
font-weight: var(--userflow-font-weight-bold, 600);
|
|
27
|
+
margin: 0 0 16px;
|
|
28
|
+
}
|
|
29
|
+
.userflowjs-theme-root h2 {
|
|
30
|
+
font-size: var(--userflow-h2-font-size, 1.125em);
|
|
31
|
+
font-weight: var(--userflow-font-weight-bold, 600);
|
|
32
|
+
margin: 0 0 16px;
|
|
33
|
+
}
|
|
34
|
+
.userflowjs-theme-root p {
|
|
35
|
+
margin: 0 0 16px;
|
|
36
|
+
}
|
|
37
|
+
.userflowjs-button-reset {
|
|
38
|
+
outline: 0;
|
|
39
|
+
border: 0;
|
|
40
|
+
padding: 0;
|
|
41
|
+
margin: 0;
|
|
42
|
+
background-color: transparent;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
.userflowjs-bubble-button-base {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
padding: calc((var(--userflow-button-height, 32px) - var(--userflow-line-height, 24px)) / 2) var(--userflow-font-size, 16px);
|
|
48
|
+
text-align: center;
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
text-overflow: ellipsis;
|
|
52
|
+
border-radius: 0.375em;
|
|
53
|
+
font-size: var(--userflow-font-size, 16px);
|
|
54
|
+
font-weight: var(--userflow-font-weight-bold, 600);
|
|
55
|
+
height: var(--userflow-button-height, 32px);
|
|
56
|
+
line-height: var(--userflow-line-height, 24px);
|
|
57
|
+
border: 0;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
.userflowjs-bubble-button {
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
}
|
|
64
|
+
.userflowjs-bubble-button--primary,
|
|
65
|
+
.userflowjs-bubble-button--default,
|
|
66
|
+
.userflowjs-bubble-button--banner-primary,
|
|
67
|
+
.userflowjs-bubble-button--banner-secondary {
|
|
68
|
+
font-family: var(--userflow-font-family, system-ui, sans-serif);
|
|
69
|
+
border-radius: var(--userflow-button-border-radius, 0.375em);
|
|
70
|
+
min-width: var(--userflow-button-min-width, 0);
|
|
71
|
+
white-space: normal;
|
|
72
|
+
max-width: 100%;
|
|
73
|
+
}
|
|
74
|
+
.userflowjs-bubble-button--banner-primary {
|
|
75
|
+
background-color: var(--userflow-banner-foreground-color);
|
|
76
|
+
color: var(--userflow-banner-background-color);
|
|
77
|
+
padding-left: 12px;
|
|
78
|
+
padding-right: 12px;
|
|
79
|
+
}
|
|
80
|
+
.userflowjs-bubble-button--banner-secondary {
|
|
81
|
+
background-color: var(--userflow-banner-background-color);
|
|
82
|
+
color: var(--userflow-banner-foreground-color);
|
|
83
|
+
border: 1px solid var(--userflow-banner-foreground-color);
|
|
84
|
+
padding-left: 12px;
|
|
85
|
+
padding-right: 12px;
|
|
86
|
+
}
|
|
87
|
+
.userflowjs-banner-root {
|
|
88
|
+
position: relative;
|
|
89
|
+
background: var(--userflow-banner-background-color);
|
|
90
|
+
color: var(--userflow-banner-foreground-color);
|
|
91
|
+
padding: 8px;
|
|
92
|
+
display: flex;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
align-items: center;
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
}
|
|
97
|
+
.userflowjs-banner-root--content-layout-START .userflowjs-banner-inner {
|
|
98
|
+
justify-content: flex-start;
|
|
99
|
+
}
|
|
100
|
+
.userflowjs-banner-root--content-layout-CENTER .userflowjs-banner-inner {
|
|
101
|
+
justify-content: center;
|
|
102
|
+
}
|
|
103
|
+
.userflowjs-banner-root--content-layout-SPACE_BETWEEN .userflowjs-banner-inner {
|
|
104
|
+
justify-content: space-between;
|
|
105
|
+
}
|
|
106
|
+
.userflowjs-banner-inner {
|
|
107
|
+
flex: 1 1 auto;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-wrap: wrap;
|
|
110
|
+
align-items: center;
|
|
111
|
+
column-gap: 16px;
|
|
112
|
+
row-gap: 8px;
|
|
113
|
+
margin: 0 8px;
|
|
114
|
+
min-width: 0;
|
|
115
|
+
}
|
|
116
|
+
.userflowjs-banner-content {
|
|
117
|
+
white-space: pre-wrap;
|
|
118
|
+
overflow-wrap: break-word;
|
|
119
|
+
flex-shrink: 1;
|
|
120
|
+
min-width: 0;
|
|
121
|
+
}
|
|
122
|
+
.userflowjs-banner-buttons {
|
|
123
|
+
display: flex;
|
|
124
|
+
gap: 8px;
|
|
125
|
+
flex-shrink: 0;
|
|
126
|
+
}
|
|
127
|
+
.userflowjs-banner-start-spacer {
|
|
128
|
+
flex: 1 1 0;
|
|
129
|
+
max-width: var(--userflow-button-height, 32px);
|
|
130
|
+
height: var(--userflow-button-height, 32px);
|
|
131
|
+
}
|
|
132
|
+
.userflowjs-banner-close {
|
|
133
|
+
flex-shrink: 0;
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
width: var(--userflow-button-height, 32px);
|
|
138
|
+
height: var(--userflow-button-height, 32px);
|
|
139
|
+
color: var(--userflow-banner-foreground-color);
|
|
140
|
+
background: transparent;
|
|
141
|
+
padding: 0;
|
|
142
|
+
border-radius: 4px;
|
|
143
|
+
}
|
|
144
|
+
.userflowjs-banner-close:hover {
|
|
145
|
+
background-color: var(--userflow-banner-hover-background-color, rgba(0,0,0,0.08));
|
|
146
|
+
}
|
|
147
|
+
`;
|
|
148
|
+
//# sourceMappingURL=bannerWebFrameCss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BANNER_WEB_FRAME_CSS"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/bannerWebFrameCss.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAO,MAAMA,oBAAoB,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { interpolateVariables } from '@userflow-tech/core';
|
|
4
|
+
import { BannerContentLayout } from '@userflow-tech/protocol';
|
|
5
|
+
import { buildBootstrapHtml, wrapCode } from "../../evalJs/bootstrap.js";
|
|
6
|
+
import { collectBannerAutoRunEvalCodes } from "./bannerAutoRunEvalJs.js";
|
|
7
|
+
import { bannerThemeStyleAttribute } from "./bannerThemeStyles.js";
|
|
8
|
+
import { BANNER_WEB_FRAME_CSS } from "./bannerWebFrameCss.js";
|
|
9
|
+
import { buttonClassName } from "./buttonClassName.js";
|
|
10
|
+
import { resolveCustomStylesheetUrl } from "./resolveCdnHost.js";
|
|
11
|
+
import { richContentDocToHtml } from "./richContentDocToHtml.js";
|
|
12
|
+
function contentLayoutClass(layout) {
|
|
13
|
+
switch (layout) {
|
|
14
|
+
case BannerContentLayout.CENTER:
|
|
15
|
+
return 'userflowjs-banner-root--content-layout-CENTER';
|
|
16
|
+
case BannerContentLayout.SPACE_BETWEEN:
|
|
17
|
+
return 'userflowjs-banner-root--content-layout-SPACE_BETWEEN';
|
|
18
|
+
case BannerContentLayout.START:
|
|
19
|
+
default:
|
|
20
|
+
return 'userflowjs-banner-root--content-layout-START';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function layoutMeasureScript() {
|
|
24
|
+
return `
|
|
25
|
+
(function(){
|
|
26
|
+
function postLayout(){
|
|
27
|
+
var root=document.querySelector('.userflowjs-banner-root');
|
|
28
|
+
if(!root||!window.ReactNativeWebView||!window.ReactNativeWebView.postMessage)return;
|
|
29
|
+
var rectH=root.getBoundingClientRect().height;
|
|
30
|
+
var scrollH=root.scrollHeight;
|
|
31
|
+
var h=Math.ceil(Math.max(scrollH,rectH));
|
|
32
|
+
var vh=window.innerHeight||0;
|
|
33
|
+
if(vh>0&&h>=vh-2){
|
|
34
|
+
var sum=0;
|
|
35
|
+
for(var i=0;i<root.childNodes.length;i++){
|
|
36
|
+
var node=root.childNodes[i];
|
|
37
|
+
if(node&&node.nodeType===1){
|
|
38
|
+
var el=node;
|
|
39
|
+
sum+=el.scrollHeight||el.offsetHeight||0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if(sum>0&&sum<h) h=Math.ceil(sum);
|
|
43
|
+
}
|
|
44
|
+
window.ReactNativeWebView.postMessage(JSON.stringify({__userflow:1,type:'bannerLayout',height:h}));
|
|
45
|
+
}
|
|
46
|
+
window.__userflowBannerLayout=postLayout;
|
|
47
|
+
if(typeof ResizeObserver!=='undefined'){
|
|
48
|
+
var root=document.querySelector('.userflowjs-banner-root');
|
|
49
|
+
if(root){new ResizeObserver(postLayout).observe(root);}
|
|
50
|
+
}
|
|
51
|
+
window.addEventListener('load',postLayout);
|
|
52
|
+
setTimeout(postLayout,0);
|
|
53
|
+
})();
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
function bannerInteractionScript() {
|
|
57
|
+
return `
|
|
58
|
+
(function(){
|
|
59
|
+
function post(msg){
|
|
60
|
+
if(window.ReactNativeWebView&&window.ReactNativeWebView.postMessage){
|
|
61
|
+
window.ReactNativeWebView.postMessage(JSON.stringify(Object.assign({__userflow:1},msg)));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
document.addEventListener('click',function(ev){
|
|
65
|
+
var t=ev.target;
|
|
66
|
+
if(!t||!t.closest)return;
|
|
67
|
+
var btn=t.closest('[data-userflow-banner-button]');
|
|
68
|
+
if(btn){
|
|
69
|
+
ev.preventDefault();
|
|
70
|
+
post({type:'bannerButton',buttonId:btn.getAttribute('data-userflow-banner-button')});
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
var close=t.closest('[data-userflow-banner-dismiss]');
|
|
74
|
+
if(close){
|
|
75
|
+
ev.preventDefault();
|
|
76
|
+
window.__userflowBannerEvalDismissed=true;
|
|
77
|
+
post({type:'bannerDismiss'});
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
})();
|
|
81
|
+
`;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Runs eval-only button scripts once the banner document (and `window.userflow`) exists. */
|
|
85
|
+
function bannerAutoRunEvalScript(banner, lookupAttribute) {
|
|
86
|
+
const codes = collectBannerAutoRunEvalCodes(banner, lookupAttribute);
|
|
87
|
+
if (codes.length === 0) {
|
|
88
|
+
return '';
|
|
89
|
+
}
|
|
90
|
+
const runs = codes.map(code => wrapCode(code)).join('');
|
|
91
|
+
return `
|
|
92
|
+
(function(){
|
|
93
|
+
if(window.__userflowBannerEvalDismissed||window.__userflowBannerEvalRan)return;
|
|
94
|
+
window.__userflowBannerEvalRan=true;
|
|
95
|
+
function run(){
|
|
96
|
+
if(window.__userflowBannerEvalDismissed)return;
|
|
97
|
+
${runs}
|
|
98
|
+
}
|
|
99
|
+
if(document.readyState==='loading'){
|
|
100
|
+
document.addEventListener('DOMContentLoaded',run,{once:true});
|
|
101
|
+
}else{
|
|
102
|
+
run();
|
|
103
|
+
}
|
|
104
|
+
})();
|
|
105
|
+
`;
|
|
106
|
+
}
|
|
107
|
+
export function buildCustomBannerBodyHtml(session, lookupAttribute, serverEndpoint, options) {
|
|
108
|
+
const banner = session.version.banner;
|
|
109
|
+
const theme = session.version.theme;
|
|
110
|
+
const layoutClass = contentLayoutClass(banner.contentLayout);
|
|
111
|
+
const themeStyle = bannerThemeStyleAttribute(theme);
|
|
112
|
+
const customCssUrl = resolveCustomStylesheetUrl(serverEndpoint, theme);
|
|
113
|
+
const maxInner = banner.maxContentWidth != null ? ` style="max-width:${banner.maxContentWidth}px"` : '';
|
|
114
|
+
const contentHtml = richContentDocToHtml(banner.content, lookupAttribute);
|
|
115
|
+
const buttonsHtml = banner.buttons.map(button => {
|
|
116
|
+
const label = escapeAttr(interpolateVariables(button.text, lookupAttribute));
|
|
117
|
+
const classes = escapeAttr(buttonClassName(button.appearance));
|
|
118
|
+
return `<button type="button" class="${classes}" data-userflow-banner-button="${escapeAttr(button.id)}"><span class="userflowjs-bubble-button-text">${label}</span></button>`;
|
|
119
|
+
}).join('');
|
|
120
|
+
const closeHtml = session.version.closeDisabled ? '<div class="userflowjs-banner-start-spacer"></div>' : '<button type="button" class="userflowjs-banner-close userflowjs-button-reset" data-userflow-banner-dismiss="1" aria-label="Dismiss">×</button>';
|
|
121
|
+
const customLink = customCssUrl ? `<link rel="stylesheet" href="${escapeAttr(customCssUrl)}" />` : '';
|
|
122
|
+
return `
|
|
123
|
+
<style>${BANNER_WEB_FRAME_CSS}</style>
|
|
124
|
+
${customLink}
|
|
125
|
+
<div class="userflowjs-banner-root userflowjs-theme-root ${layoutClass}" style="${themeStyle}">
|
|
126
|
+
<div class="userflowjs-banner-start-spacer"></div>
|
|
127
|
+
<div class="userflowjs-banner-inner"${maxInner}>
|
|
128
|
+
<div class="userflowjs-banner-content">${contentHtml}</div>
|
|
129
|
+
${buttonsHtml ? `<div class="userflowjs-banner-buttons">${buttonsHtml}</div>` : ''}
|
|
130
|
+
</div>
|
|
131
|
+
${closeHtml}
|
|
132
|
+
</div>
|
|
133
|
+
<script>${layoutMeasureScript()}${bannerInteractionScript()}${options?.skipAutoRunEval ? '' : bannerAutoRunEvalScript(banner, lookupAttribute)}</script>
|
|
134
|
+
`;
|
|
135
|
+
}
|
|
136
|
+
export function buildCustomBannerHtml(context, session, lookupAttribute, serverEndpoint, options) {
|
|
137
|
+
const body = buildCustomBannerBodyHtml(session, lookupAttribute, serverEndpoint, options);
|
|
138
|
+
return buildBootstrapHtml(context, body);
|
|
139
|
+
}
|
|
140
|
+
function escapeAttr(value) {
|
|
141
|
+
return value.replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<');
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=buildCustomBannerHtml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["interpolateVariables","BannerContentLayout","buildBootstrapHtml","wrapCode","collectBannerAutoRunEvalCodes","bannerThemeStyleAttribute","BANNER_WEB_FRAME_CSS","buttonClassName","resolveCustomStylesheetUrl","richContentDocToHtml","contentLayoutClass","layout","CENTER","SPACE_BETWEEN","START","layoutMeasureScript","bannerInteractionScript","bannerAutoRunEvalScript","banner","lookupAttribute","codes","length","runs","map","code","join","buildCustomBannerBodyHtml","session","serverEndpoint","options","version","theme","layoutClass","contentLayout","themeStyle","customCssUrl","maxInner","maxContentWidth","contentHtml","content","buttonsHtml","buttons","button","label","escapeAttr","text","classes","appearance","id","closeHtml","closeDisabled","customLink","skipAutoRunEval","buildCustomBannerHtml","context","body","value","replace"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/buildCustomBannerHtml.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,qBAAqB;AAE1D,SAASC,mBAAmB,QAAQ,yBAAyB;AAE7D,SAASC,kBAAkB,EAAEC,QAAQ,QAAQ,2BAAwB;AAGrE,SAASC,6BAA6B,QAAQ,0BAAuB;AACrE,SAASC,yBAAyB,QAAQ,wBAAqB;AAC/D,SAASC,oBAAoB,QAAQ,wBAAqB;AAC1D,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,0BAA0B,QAAQ,qBAAkB;AAC7D,SAASC,oBAAoB,QAAQ,2BAAwB;AAE7D,SAASC,kBAAkBA,CAACC,MAA2B,EAAU;EAC/D,QAAQA,MAAM;IACZ,KAAKV,mBAAmB,CAACW,MAAM;MAC7B,OAAO,+CAA+C;IACxD,KAAKX,mBAAmB,CAACY,aAAa;MACpC,OAAO,sDAAsD;IAC/D,KAAKZ,mBAAmB,CAACa,KAAK;IAC9B;MACE,OAAO,8CAA8C;EACzD;AACF;AAEA,SAASC,mBAAmBA,CAAA,EAAW;EACrC,OAAO;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AAc,EAAEC,OAAO,CAAC;EACzF,OAAO3B,kBAAkB,CAACoD,OAAO,EAAEC,IAAI,CAAC;AAC1C;AAEA,SAASX,UAAUA,CAACY,KAAa,EAAU;EACzC,OAAOA,KAAK,CAACC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAACA,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAACA,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;AACnF","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** Mirrors web `TreeDoc.buttonClassName`. */
|
|
4
|
+
export function buttonClassName(appearance) {
|
|
5
|
+
const value = appearance || 'default';
|
|
6
|
+
const known = value === 'primary' || value === 'PRIMARY' || value === 'default' || value === 'DEFAULT' || value === 'banner-primary' || value === 'banner-secondary';
|
|
7
|
+
return 'userflowjs-bubble-button ' + (known ? `userflowjs-bubble-button--${value.toLowerCase()}` : value);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=buttonClassName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["buttonClassName","appearance","value","known","toLowerCase"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/buttonClassName.ts"],"mappings":";;AAAA;AACA,OAAO,SAASA,eAAeA,CAACC,UAAqC,EAAU;EAC7E,MAAMC,KAAK,GAAGD,UAAU,IAAI,SAAS;EACrC,MAAME,KAAK,GACTD,KAAK,KAAK,SAAS,IACnBA,KAAK,KAAK,SAAS,IACnBA,KAAK,KAAK,SAAS,IACnBA,KAAK,KAAK,SAAS,IACnBA,KAAK,KAAK,gBAAgB,IAC1BA,KAAK,KAAK,kBAAkB;EAC9B,OACE,2BAA2B,IAC1BC,KAAK,GAAG,6BAA6BD,KAAK,CAACE,WAAW,CAAC,CAAC,EAAE,GAAGF,KAAK,CAAC;AAExE","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Map the end-user websocket host to the theme stylesheet CDN host
|
|
5
|
+
* (same convention as web userflow.js).
|
|
6
|
+
*/
|
|
7
|
+
export function resolveCdnHost(serverEndpoint) {
|
|
8
|
+
const trimmed = serverEndpoint.replace(/\/$/, '');
|
|
9
|
+
let host = trimmed;
|
|
10
|
+
if (host.startsWith('https://')) {
|
|
11
|
+
host = host.slice('https://'.length);
|
|
12
|
+
} else if (host.startsWith('http://')) {
|
|
13
|
+
host = host.slice('http://'.length);
|
|
14
|
+
}
|
|
15
|
+
if (host.startsWith('e.')) {
|
|
16
|
+
return `cdn.${host.slice(2)}`;
|
|
17
|
+
}
|
|
18
|
+
if (host.includes('localhost') || host.includes('127.0.0.1')) {
|
|
19
|
+
return 'cdn.userflow.com';
|
|
20
|
+
}
|
|
21
|
+
return `cdn.${host}`;
|
|
22
|
+
}
|
|
23
|
+
export function themePublishedCssVersion(theme) {
|
|
24
|
+
const cssVersion = theme.cssVersion;
|
|
25
|
+
if (typeof cssVersion !== 'string' && typeof cssVersion !== 'number') {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const version = String(cssVersion);
|
|
29
|
+
return version ? version : null;
|
|
30
|
+
}
|
|
31
|
+
export function themeHasPublishedCustomCss(theme) {
|
|
32
|
+
return themePublishedCssVersion(theme) != null;
|
|
33
|
+
}
|
|
34
|
+
export function resolveCustomStylesheetUrl(serverEndpoint, theme) {
|
|
35
|
+
const version = themePublishedCssVersion(theme);
|
|
36
|
+
if (!version) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const cdnHost = resolveCdnHost(serverEndpoint);
|
|
40
|
+
return `https://${cdnHost}/themes/${theme.id}/stylesheets/${version}/custom.css`;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=resolveCdnHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveCdnHost","serverEndpoint","trimmed","replace","host","startsWith","slice","length","includes","themePublishedCssVersion","theme","cssVersion","version","String","themeHasPublishedCustomCss","resolveCustomStylesheetUrl","cdnHost","id"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/resolveCdnHost.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASA,cAAcA,CAACC,cAAsB,EAAU;EAC7D,MAAMC,OAAO,GAAGD,cAAc,CAACE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;EACjD,IAAIC,IAAI,GAAGF,OAAO;EAClB,IAAIE,IAAI,CAACC,UAAU,CAAC,UAAU,CAAC,EAAE;IAC/BD,IAAI,GAAGA,IAAI,CAACE,KAAK,CAAC,UAAU,CAACC,MAAM,CAAC;EACtC,CAAC,MAAM,IAAIH,IAAI,CAACC,UAAU,CAAC,SAAS,CAAC,EAAE;IACrCD,IAAI,GAAGA,IAAI,CAACE,KAAK,CAAC,SAAS,CAACC,MAAM,CAAC;EACrC;EACA,IAAIH,IAAI,CAACC,UAAU,CAAC,IAAI,CAAC,EAAE;IACzB,OAAO,OAAOD,IAAI,CAACE,KAAK,CAAC,CAAC,CAAC,EAAE;EAC/B;EACA,IAAIF,IAAI,CAACI,QAAQ,CAAC,WAAW,CAAC,IAAIJ,IAAI,CAACI,QAAQ,CAAC,WAAW,CAAC,EAAE;IAC5D,OAAO,kBAAkB;EAC3B;EACA,OAAO,OAAOJ,IAAI,EAAE;AACtB;AAEA,OAAO,SAASK,wBAAwBA,CAACC,KAAoB,EAAiB;EAC5E,MAAMC,UAAU,GAAGD,KAAK,CAACC,UAAU;EACnC,IAAI,OAAOA,UAAU,KAAK,QAAQ,IAAI,OAAOA,UAAU,KAAK,QAAQ,EAAE;IACpE,OAAO,IAAI;EACb;EACA,MAAMC,OAAO,GAAGC,MAAM,CAACF,UAAU,CAAC;EAClC,OAAOC,OAAO,GAAGA,OAAO,GAAG,IAAI;AACjC;AAEA,OAAO,SAASE,0BAA0BA,CAACJ,KAAoB,EAAW;EACxE,OAAOD,wBAAwB,CAACC,KAAK,CAAC,IAAI,IAAI;AAChD;AAEA,OAAO,SAASK,0BAA0BA,CACxCd,cAAsB,EACtBS,KAAoB,EACL;EACf,MAAME,OAAO,GAAGH,wBAAwB,CAACC,KAAK,CAAC;EAC/C,IAAI,CAACE,OAAO,EAAE;IACZ,OAAO,IAAI;EACb;EACA,MAAMI,OAAO,GAAGhB,cAAc,CAACC,cAAc,CAAC;EAC9C,OAAO,WAAWe,OAAO,WAAWN,KAAK,CAACO,EAAE,gBAAgBL,OAAO,aAAa;AAClF","ignoreList":[]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { interpolateVariables } from '@userflow-tech/core';
|
|
4
|
+
import { deserializeRichContentDoc, isText, stringifyPlaintextDoc } from "../../content/deserialize.js";
|
|
5
|
+
function escapeHtml(text) {
|
|
6
|
+
return text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
7
|
+
}
|
|
8
|
+
function inlineNodesToHtml(nodes, lookupAttribute) {
|
|
9
|
+
let html = '';
|
|
10
|
+
for (const node of nodes) {
|
|
11
|
+
if (isText(node)) {
|
|
12
|
+
let text = node.text;
|
|
13
|
+
if (node.silent) {
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
text = interpolateVariables(text, lookupAttribute);
|
|
17
|
+
let chunk = escapeHtml(text);
|
|
18
|
+
if (node.bold) {
|
|
19
|
+
chunk = `<strong>${chunk}</strong>`;
|
|
20
|
+
}
|
|
21
|
+
if (node.italic) {
|
|
22
|
+
chunk = `<em>${chunk}</em>`;
|
|
23
|
+
}
|
|
24
|
+
if (node.underline) {
|
|
25
|
+
chunk = `<u>${chunk}</u>`;
|
|
26
|
+
}
|
|
27
|
+
if (node.code) {
|
|
28
|
+
chunk = `<code>${chunk}</code>`;
|
|
29
|
+
}
|
|
30
|
+
html += chunk;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (node.type === 'link') {
|
|
34
|
+
const href = escapeHtml(stringifyPlaintextDoc(node.href, {
|
|
35
|
+
lookupAttribute
|
|
36
|
+
}));
|
|
37
|
+
const inner = inlineNodesToHtml(node.children, lookupAttribute);
|
|
38
|
+
const target = node.target === 'new' ? ' target="_blank" rel="noopener noreferrer"' : '';
|
|
39
|
+
html += `<a href="${href}"${target}>${inner}</a>`;
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (node.type === 'attribute') {
|
|
43
|
+
const value = lookupAttribute(node.attributeName ?? '') ?? node.fallback ?? '';
|
|
44
|
+
html += escapeHtml(value);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return html;
|
|
48
|
+
}
|
|
49
|
+
function blockToHtml(node, lookupAttribute) {
|
|
50
|
+
switch (node.type) {
|
|
51
|
+
case 'paragraph':
|
|
52
|
+
return `<p>${inlineNodesToHtml(node.children, lookupAttribute)}</p>`;
|
|
53
|
+
case 'heading1':
|
|
54
|
+
return `<h1>${inlineNodesToHtml(node.children, lookupAttribute)}</h1>`;
|
|
55
|
+
case 'heading2':
|
|
56
|
+
return `<h2>${inlineNodesToHtml(node.children, lookupAttribute)}</h2>`;
|
|
57
|
+
case 'quote':
|
|
58
|
+
return `<blockquote>${inlineNodesToHtml(node.children, lookupAttribute)}</blockquote>`;
|
|
59
|
+
case 'unordered-list':
|
|
60
|
+
return `<ul>${node.children.map(item => `<li>${inlineNodesToHtml(item.children, lookupAttribute)}</li>`).join('')}</ul>`;
|
|
61
|
+
case 'ordered-list':
|
|
62
|
+
return `<ol>${node.children.map(item => `<li>${inlineNodesToHtml(item.children, lookupAttribute)}</li>`).join('')}</ol>`;
|
|
63
|
+
case 'code-block':
|
|
64
|
+
return `<pre><code>${inlineNodesToHtml(node.children, lookupAttribute)}</code></pre>`;
|
|
65
|
+
case 'container':
|
|
66
|
+
{
|
|
67
|
+
const extra = node.className ? ` ${escapeHtml(node.className)}` : '';
|
|
68
|
+
const inner = node.children.map(child => blockToHtml(child, lookupAttribute)).join('');
|
|
69
|
+
return `<div class="p-like${extra}">${inner}</div>`;
|
|
70
|
+
}
|
|
71
|
+
default:
|
|
72
|
+
return '';
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export function richContentDocToHtml(content, lookupAttribute) {
|
|
76
|
+
const doc = typeof content === 'string' || content == null ? deserializeRichContentDoc(content) : content;
|
|
77
|
+
return doc.children.map(block => blockToHtml(block, lookupAttribute)).join('');
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=richContentDocToHtml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["interpolateVariables","deserializeRichContentDoc","isText","stringifyPlaintextDoc","escapeHtml","text","replace","inlineNodesToHtml","nodes","lookupAttribute","html","node","silent","chunk","bold","italic","underline","code","type","href","inner","children","target","value","attributeName","fallback","blockToHtml","map","item","join","extra","className","child","richContentDocToHtml","content","doc","block"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/richContentDocToHtml.ts"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,qBAAqB;AAE1D,SACEC,yBAAyB,EACzBC,MAAM,EACNC,qBAAqB,QAChB,8BAA2B;AAQlC,SAASC,UAAUA,CAACC,IAAY,EAAU;EACxC,OAAOA,IAAI,CACRC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CACtBA,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CACrBA,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CACrBA,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;AAC5B;AAEA,SAASC,iBAAiBA,CACxBC,KAA8B,EAC9BC,eAAgC,EACxB;EACR,IAAIC,IAAI,GAAG,EAAE;EACb,KAAK,MAAMC,IAAI,IAAIH,KAAK,EAAE;IACxB,IAAIN,MAAM,CAACS,IAAI,CAAC,EAAE;MAChB,IAAIN,IAAI,GAAGM,IAAI,CAACN,IAAI;MACpB,IAAIM,IAAI,CAAC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ACA;MACE,OAAO,EAAE;EACb;AACF;AAEA,OAAO,SAASa,oBAAoBA,CAClCC,OAAmD,EACnDzB,eAAgC,EACxB;EACR,MAAM0B,GAAG,GACP,OAAOD,OAAO,KAAK,QAAQ,IAAIA,OAAO,IAAI,IAAI,GAAGjC,yBAAyB,CAACiC,OAAO,CAAC,GAAGA,OAAO;EAC/F,OAAOC,GAAG,CAACd,QAAQ,CAACM,GAAG,CAAES,KAAK,IAAKV,WAAW,CAACU,KAAK,EAAE3B,eAAe,CAAC,CAAC,CAACoB,IAAI,CAAC,EAAE,CAAC;AAClF","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** Default banner chrome when theme banner tokens are unset (matches product / web debugger palette). */
|
|
4
|
+
export const DEFAULT_BANNER_BACKGROUND_COLOR = '#0A1A24';
|
|
5
|
+
export const DEFAULT_BANNER_FOREGROUND_COLOR = '#FFFFFF';
|
|
6
|
+
function readThemeColor(theme, key) {
|
|
7
|
+
const value = theme[key];
|
|
8
|
+
return typeof value === 'string' && value.trim().length > 0 ? value.trim() : undefined;
|
|
9
|
+
}
|
|
10
|
+
export function resolveBannerBackgroundColor(theme) {
|
|
11
|
+
return readThemeColor(theme, 'bannerBackgroundColor') ?? DEFAULT_BANNER_BACKGROUND_COLOR;
|
|
12
|
+
}
|
|
13
|
+
export function resolveBannerForegroundColor(theme) {
|
|
14
|
+
return readThemeColor(theme, 'bannerForegroundColor') ?? DEFAULT_BANNER_FOREGROUND_COLOR;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=resolveBannerTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_BANNER_BACKGROUND_COLOR","DEFAULT_BANNER_FOREGROUND_COLOR","readThemeColor","theme","key","value","trim","length","undefined","resolveBannerBackgroundColor","resolveBannerForegroundColor"],"sourceRoot":"../../../src","sources":["surfaces/resolveBannerTheme.ts"],"mappings":";;AAEA;AACA,OAAO,MAAMA,+BAA+B,GAAG,SAAS;AACxD,OAAO,MAAMC,+BAA+B,GAAG,SAAS;AAExD,SAASC,cAAcA,CAACC,KAAoB,EAAEC,GAAW,EAAsB;EAC7E,MAAMC,KAAK,GAAGF,KAAK,CAACC,GAAG,CAAC;EACxB,OAAO,OAAOC,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACC,IAAI,CAAC,CAAC,CAACC,MAAM,GAAG,CAAC,GAAGF,KAAK,CAACC,IAAI,CAAC,CAAC,GAAGE,SAAS;AACxF;AAEA,OAAO,SAASC,4BAA4BA,CAACN,KAAoB,EAAU;EACzE,OAAOD,cAAc,CAACC,KAAK,EAAE,uBAAuB,CAAC,IAAIH,+BAA+B;AAC1F;AAEA,OAAO,SAASU,4BAA4BA,CAACP,KAAoB,EAAU;EACzE,OAAOD,cAAc,CAACC,KAAK,EAAE,uBAAuB,CAAC,IAAIF,+BAA+B;AAC1F","ignoreList":[]}
|
|
@@ -1,41 +1,100 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import React from 'react';
|
|
3
4
|
const ZERO_INSETS = {
|
|
4
5
|
top: 0,
|
|
5
6
|
right: 0,
|
|
6
7
|
bottom: 0,
|
|
7
8
|
left: 0
|
|
8
9
|
};
|
|
9
|
-
let cachedHook;
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
12
|
+
* Used only when `react-native-safe-area-context` is not installed, so
|
|
13
|
+
* {@link useUserflowSafeAreaInsets} can call `useContext` unconditionally.
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const FallbackInsetsContext = /*#__PURE__*/React.createContext(null);
|
|
16
|
+
export const MISSING_SAFE_AREA_PROVIDER_WARNING = '[Userflow] UserflowProvider is not inside a <SafeAreaProvider>, so flow cards use the ' + "device's initial safe-area insets. Wrap your app in <SafeAreaProvider> from " + 'react-native-safe-area-context.';
|
|
17
|
+
let cachedModule;
|
|
18
|
+
let warnedMissingProvider = false;
|
|
19
|
+
function loadSafeAreaModule() {
|
|
20
|
+
if (cachedModule !== undefined) return cachedModule;
|
|
17
21
|
if (typeof require !== 'function') {
|
|
18
|
-
|
|
19
|
-
return
|
|
22
|
+
cachedModule = null;
|
|
23
|
+
return null;
|
|
20
24
|
}
|
|
21
25
|
try {
|
|
22
26
|
// Optional peer — Expo / React Navigation apps usually have it.
|
|
23
27
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
24
28
|
const mod = require('react-native-safe-area-context');
|
|
25
|
-
|
|
29
|
+
cachedModule = mod?.SafeAreaInsetsContext ? mod : null;
|
|
26
30
|
} catch {
|
|
27
|
-
|
|
31
|
+
cachedModule = null;
|
|
28
32
|
}
|
|
29
|
-
return
|
|
33
|
+
return cachedModule;
|
|
34
|
+
}
|
|
35
|
+
function copyInsets(insets) {
|
|
36
|
+
if (!insets) return null;
|
|
37
|
+
const top = insets.top;
|
|
38
|
+
const right = insets.right;
|
|
39
|
+
const bottom = insets.bottom;
|
|
40
|
+
const left = insets.left;
|
|
41
|
+
if (typeof top !== 'number' || typeof right !== 'number' || typeof bottom !== 'number' || typeof left !== 'number') {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
top,
|
|
46
|
+
right,
|
|
47
|
+
bottom,
|
|
48
|
+
left
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Device insets from the optional peer, before any provider has measured. */
|
|
53
|
+
function readInitialInsets() {
|
|
54
|
+
return copyInsets(loadSafeAreaModule()?.initialWindowMetrics?.insets);
|
|
55
|
+
}
|
|
56
|
+
function warnMissingProvider() {
|
|
57
|
+
if (warnedMissingProvider || !__DEV__) return;
|
|
58
|
+
warnedMissingProvider = true;
|
|
59
|
+
// eslint-disable-next-line no-console -- intentional missing-provider diagnostic
|
|
60
|
+
console.warn(MISSING_SAFE_AREA_PROVIDER_WARNING);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Safe-area insets for flow chrome.
|
|
65
|
+
*
|
|
66
|
+
* Reads `SafeAreaInsetsContext` directly. `useSafeAreaInsets()` throws when the
|
|
67
|
+
* peer is installed but no `SafeAreaProvider` is mounted, which would take down
|
|
68
|
+
* the host tree. A missing provider falls back to `initialWindowMetrics`, then
|
|
69
|
+
* zero, and warns once in development.
|
|
70
|
+
*/
|
|
71
|
+
function insetsContext() {
|
|
72
|
+
return loadSafeAreaModule()?.SafeAreaInsetsContext ?? FallbackInsetsContext;
|
|
30
73
|
}
|
|
31
74
|
|
|
32
|
-
/**
|
|
75
|
+
/** Value from the nearest provider, or `null` when the peer or provider is absent. */
|
|
76
|
+
export function useParentSafeAreaInsets() {
|
|
77
|
+
return copyInsets(React.useContext(insetsContext()));
|
|
78
|
+
}
|
|
33
79
|
export function useUserflowSafeAreaInsets() {
|
|
34
|
-
|
|
80
|
+
const fromProvider = useParentSafeAreaInsets();
|
|
81
|
+
if (fromProvider) return fromProvider;
|
|
82
|
+
if (!loadSafeAreaModule()) return ZERO_INSETS;
|
|
83
|
+
warnMissingProvider();
|
|
84
|
+
return readInitialInsets() ?? ZERO_INSETS;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* `SafeAreaInsetsContext` from the optional peer, or `null` when it is not installed.
|
|
89
|
+
* In-flow banners override this so host screens do not add the inset the banner already consumed.
|
|
90
|
+
*/
|
|
91
|
+
export function getSafeAreaInsetsContext() {
|
|
92
|
+
return loadSafeAreaModule()?.SafeAreaInsetsContext ?? null;
|
|
35
93
|
}
|
|
36
94
|
|
|
37
95
|
/** @internal */
|
|
38
96
|
export function resetSafeAreaInsetsCacheForTests() {
|
|
39
|
-
|
|
97
|
+
cachedModule = undefined;
|
|
98
|
+
warnedMissingProvider = false;
|
|
40
99
|
}
|
|
41
100
|
//# sourceMappingURL=safeArea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ZERO_INSETS","top","right","bottom","left","
|
|
1
|
+
{"version":3,"names":["React","ZERO_INSETS","top","right","bottom","left","FallbackInsetsContext","createContext","MISSING_SAFE_AREA_PROVIDER_WARNING","cachedModule","warnedMissingProvider","loadSafeAreaModule","undefined","require","mod","SafeAreaInsetsContext","copyInsets","insets","readInitialInsets","initialWindowMetrics","warnMissingProvider","__DEV__","console","warn","insetsContext","useParentSafeAreaInsets","useContext","useUserflowSafeAreaInsets","fromProvider","getSafeAreaInsetsContext","resetSafeAreaInsetsCacheForTests"],"sourceRoot":"../../../src","sources":["surfaces/safeArea.ts"],"mappings":";;AAAA,OAAOA,KAAK,MAAwB,OAAO;AAS3C,MAAMC,WAAuB,GAAG;EAAEC,GAAG,EAAE,CAAC;EAAEC,KAAK,EAAE,CAAC;EAAEC,MAAM,EAAE,CAAC;EAAEC,IAAI,EAAE;AAAE,CAAC;;AAExE;AACA;AACA;AACA;AACA,MAAMC,qBAAqB,gBAAGN,KAAK,CAACO,aAAa,CAAoB,IAAI,CAAC;AAE1E,OAAO,MAAMC,kCAAkC,GAC7C,wFAAwF,GACxF,8EAA8E,GAC9E,iCAAiC;AAOnC,IAAIC,YAA+C;AACnD,IAAIC,qBAAqB,GAAG,KAAK;AAEjC,SAASC,kBAAkBA,CAAA,EAA0B;EACnD,IAAIF,YAAY,KAAKG,SAAS,EAAE,OAAOH,YAAY;EAEnD,IAAI,OAAOI,OAAO,KAAK,UAAU,EAAE;IACjCJ,YAAY,GAAG,IAAI;IACnB,OAAO,IAAI;EACb;EAEA,IAAI;IACF;IACA;IACA,MAAMK,GAAG,GAAGD,OAAO,CAAC,gCAAgC,CAAmB;IACvEJ,YAAY,GAAGK,GAAG,EAAEC,qBAAqB,GAAGD,GAAG,GAAG,IAAI;EACxD,CAAC,CAAC,MAAM;IACNL,YAAY,GAAG,IAAI;EACrB;EAEA,OAAOA,YAAY;AACrB;AAEA,SAASO,UAAUA,CAACC,MAA8C,EAAqB;EACrF,IAAI,C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CAAC,CAAC;EACrB,OAAOF,iBAAiB,CAAC,CAAC,IAAIjB,WAAW;AAC3C;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAAS4B,wBAAwBA,CAAA,EAAsC;EAC5E,OAAOlB,kBAAkB,CAAC,CAAC,EAAEI,qBAAqB,IAAI,IAAI;AAC5D;;AAEA;AACA,OAAO,SAASe,gCAAgCA,CAAA,EAAS;EACvDrB,YAAY,GAAGG,SAAS;EACxBF,qBAAqB,GAAG,KAAK;AAC/B","ignoreList":[]}
|
package/lib/module/version.js
CHANGED
|
@@ -6,6 +6,11 @@ export interface AnchorHost {
|
|
|
6
6
|
* Called when the measured rect is not fully visible (bounded retries per step).
|
|
7
7
|
*/
|
|
8
8
|
scrollIntoView?: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* Public instance this host was registered from, when known. Element click
|
|
11
|
+
* conditions use it to match a tap to this anchor.
|
|
12
|
+
*/
|
|
13
|
+
node?: object | null;
|
|
9
14
|
}
|
|
10
15
|
type Listener = () => void;
|
|
11
16
|
/**
|
|
@@ -19,6 +24,8 @@ export declare class AnchorRegistry {
|
|
|
19
24
|
register(id: string, host: AnchorHost): void;
|
|
20
25
|
unregister(id: string, host: AnchorHost): void;
|
|
21
26
|
get(id: string): AnchorHost | null;
|
|
27
|
+
/** Every host registered for `id`, in registration order. */
|
|
28
|
+
getAll(id: string): AnchorHost[];
|
|
22
29
|
/** True when more than one host is registered for the same id. */
|
|
23
30
|
isAmbiguous(id: string): boolean;
|
|
24
31
|
subscribe(listener: Listener): () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnchorRegistry.d.ts","sourceRoot":"","sources":["../../../../../src/anchors/AnchorRegistry.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,MAAM,WAAW,UAAU;IACzB,eAAe,EAAE,CACf,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MA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