@userflow-tech/react-native 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -77
- 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/deep-linking.md +70 -33
- package/docs/isolation.md +75 -0
- package/docs/troubleshooting.md +40 -17
- package/docs/webview-custom-banner-poc.md +64 -0
- package/expo-plugin/withUserflow.d.ts +3 -2
- package/expo-plugin/withUserflow.d.ts.map +1 -1
- package/expo-plugin/withUserflow.js +14 -8
- package/expo-plugin/withUserflow.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/fiber/fiberPath.js +122 -0
- package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js +60 -50
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js +220 -0
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js +147 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js +73 -36
- package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js +66 -0
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js +51 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +22 -15
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/semanticMatcher.js +26 -8
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -1
- package/lib/commonjs/anonymousId.js +4 -1
- 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 +118 -43
- package/lib/commonjs/index.js.map +1 -1
- 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 +47 -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 +19 -12
- 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 +135 -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/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 +23 -0
- package/lib/commonjs/surfaces/safeArea.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/fiber/fiberPath.js +118 -0
- package/lib/module/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js +60 -50
- package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/module/anchors/fiber/resolveFiberPath.js +215 -0
- package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/visibleRect.js +139 -0
- package/lib/module/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/module/anchors/fiber/visibleScreens.js +73 -37
- package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/module/anchors/fiber/walkVisibleFibers.js +61 -0
- package/lib/module/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js +46 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/module/anchors/resolveAutoAnchorHost.js +22 -15
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/module/anchors/semanticMatcher.js +26 -9
- package/lib/module/anchors/semanticMatcher.js.map +1 -1
- package/lib/module/anonymousId.js +4 -2
- 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 +114 -45
- package/lib/module/index.js.map +1 -1
- 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 +41 -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 +19 -12
- 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 +136 -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/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 +22 -0
- package/lib/module/surfaces/safeArea.js.map +1 -1
- package/lib/module/version.js +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/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- 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/anonymousId.d.ts +1 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +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/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.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/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 +6 -0
- 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/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- 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/anonymousId.d.ts +1 -0
- package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +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/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.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/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 +6 -0
- 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 +4 -3
- package/src/anchors/AutoAnchorRegistry.ts +41 -11
- package/src/anchors/fiber/fiberPath.ts +117 -0
- package/src/anchors/fiber/findAnchorFiber.ts +57 -47
- package/src/anchors/fiber/resolveFiberPath.ts +215 -0
- package/src/anchors/fiber/visibleRect.ts +153 -0
- package/src/anchors/fiber/visibleScreens.ts +74 -36
- package/src/anchors/fiber/walkVisibleFibers.ts +65 -0
- package/src/anchors/isInstanceOnVisibleScreen.ts +55 -0
- package/src/anchors/resolveAutoAnchorHost.ts +17 -15
- package/src/anchors/semanticMatcher.ts +38 -14
- package/src/anonymousId.ts +2 -1
- 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 +129 -45
- 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 +43 -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 +19 -12
- package/src/runtime/UserflowOverlay.tsx +118 -0
- package/src/runtime/UserflowProvider.tsx +139 -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/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 +29 -0
- 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/engine/BannerSessionEngine.d.ts +73 -0
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js +236 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -0
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +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 +47 -27
- 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 +4 -1
- 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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AAEA,SAASC,uBAAuBA,CAAA,EAAW;EACzC,OAAO;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA;AACA,SAASC,uBAAuBA,CAC9BC,MAAsB,EACtBC,eAA+C,EACvC;EACR,MAAMC,KAAK,GAAGhB,6BAA6B,CAACc,MAAM,EAAEC,eAAe,CAAC;EACpE,IAAIC,KAAK,CAACC,MAAM,KAAK,CAAC,EAAE;IACtB,OAAO,EAAE;EACX;EACA,MAAMC,IAAI,GAAGF,KAAK,CAACG,GAAG,CAAEC,IAAI,IAAKrB,QAAQ,CAACqB,IAAI,CAAC,CAAC,CAACC,IAAI,CAAC,EAAE,CAAC;EACzD,OAAO;AACT;AACA;AACA;AACA;AACA;AACA,MAAMH,IAAI;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AAOA,OAAO,SAASI,yBAAyBA,CACvCC,OAA8B,EAC9BR,eAA+C,EAC/CS,cAAsB,EACtBC,OAAsC,EAC9B;EACR,MAAMX,MAAM,GAAGS,OAAO,CAACG,OAAO,CAACZ,MAAwB;EACvD,MAAMa,KAAK,GAAGJ,OAAO,CAACG,OAAO,CAACC,KAAK;EACnC,MAAMC,WAAW,GAAGtB,kBAAkB,CAACQ,MAAM,CAAC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,GAAGa,OAAO,EAAEuB,eAAe,GAAG,EAAE,GAAGnC,uBAAuB,CAACC,MAAM,EAAEC,eAAe,CAAC;AAC9I,CAAC;AACD;AAEA,OAAO,SAASkC,qBAAqBA,CACnCC,OAAsB,EACtB3B,OAA8B,EAC9BR,eAA+C,EAC/CS,cAAsB,EACtBC,OAAsC,EAC9B;EACR,MAAM0B,IAAI,GAAG7B,yBAAyB,CAACC,OAAO,EAAER,eAAe,EAAES,cAAc,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,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,SAAS,GAAG,IAAI3B,UAAU,CAACO,IAAI,CAACoB,SAAS,CAAC,EAAE,GAAG,EAAE;QACpE,MAAMX,KAAK,GAAGT,IAAI,CAACU,QAAQ,CAACM,GAAG,CAAEK,KAAK,IAAKN,WAAW,CAACM,KAAK,EAAEvB,eAAe,CAAC,CAAC,CAACoB,IAAI,CAAC,EAAE,CAAC;QACxF,OAAO,qBAAqBC,KAAK,KAAKV,KAAK,QAAQ;MACrD;IACA;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":[]}
|
|
@@ -7,6 +7,7 @@ const ZERO_INSETS = {
|
|
|
7
7
|
left: 0
|
|
8
8
|
};
|
|
9
9
|
let cachedHook;
|
|
10
|
+
let cachedInsetsContext;
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Resolve `useSafeAreaInsets` from the optional peer `react-native-safe-area-context`.
|
|
@@ -34,8 +35,29 @@ export function useUserflowSafeAreaInsets() {
|
|
|
34
35
|
return resolveUseSafeAreaInsets()();
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
/**
|
|
39
|
+
* `SafeAreaInsetsContext` from the optional peer, or `null` when it is not installed.
|
|
40
|
+
* In-flow banners override this so host screens do not add the inset the banner already consumed.
|
|
41
|
+
*/
|
|
42
|
+
export function getSafeAreaInsetsContext() {
|
|
43
|
+
if (cachedInsetsContext !== undefined) return cachedInsetsContext;
|
|
44
|
+
if (typeof require !== 'function') {
|
|
45
|
+
cachedInsetsContext = null;
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
50
|
+
const mod = require('react-native-safe-area-context');
|
|
51
|
+
cachedInsetsContext = mod.SafeAreaInsetsContext ?? null;
|
|
52
|
+
} catch {
|
|
53
|
+
cachedInsetsContext = null;
|
|
54
|
+
}
|
|
55
|
+
return cachedInsetsContext;
|
|
56
|
+
}
|
|
57
|
+
|
|
37
58
|
/** @internal */
|
|
38
59
|
export function resetSafeAreaInsetsCacheForTests() {
|
|
39
60
|
cachedHook = undefined;
|
|
61
|
+
cachedInsetsContext = undefined;
|
|
40
62
|
}
|
|
41
63
|
//# sourceMappingURL=safeArea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ZERO_INSETS","top","right","bottom","left","cachedHook","resolveUseSafeAreaInsets","undefined","require","mod","useSafeAreaInsets","useUserflowSafeAreaInsets","resetSafeAreaInsetsCacheForTests"],"sourceRoot":"../../../src","sources":["surfaces/safeArea.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["ZERO_INSETS","top","right","bottom","left","cachedHook","cachedInsetsContext","resolveUseSafeAreaInsets","undefined","require","mod","useSafeAreaInsets","useUserflowSafeAreaInsets","getSafeAreaInsetsContext","SafeAreaInsetsContext","resetSafeAreaInsetsCacheForTests"],"sourceRoot":"../../../src","sources":["surfaces/safeArea.ts"],"mappings":";;AASA,MAAMA,WAAuB,GAAG;EAAEC,GAAG,EAAE,CAAC;EAAEC,KAAK,EAAE,CAAC;EAAEC,MAAM,EAAE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[]}
|
package/lib/module/version.js
CHANGED
|
@@ -118,10 +118,24 @@ export declare class AutoAnchorRegistry {
|
|
|
118
118
|
private applyLiveIdentity;
|
|
119
119
|
subscribe(listener: AutoAnchorListener): () => void;
|
|
120
120
|
isAmbiguousKey(key: string): boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Whether `inst` still has a look-alike inside `include`.
|
|
123
|
+
*
|
|
124
|
+
* The stored {@link AutoAnchorInstance.ambiguous} flag is registry-wide, so a
|
|
125
|
+
* copy on a covered screen keeps it set. Visibility can only clear that, never
|
|
126
|
+
* add ambiguity: an instance the registry considers unique stays unique.
|
|
127
|
+
*/
|
|
128
|
+
isAmbiguousAmong(inst: AutoAnchorInstance, include: (i: AutoAnchorInstance) => boolean): boolean;
|
|
121
129
|
/** Test helper — drop every instance and reset ids. */
|
|
122
130
|
clear(): void;
|
|
123
131
|
private unregisterInstance;
|
|
124
132
|
private refreshManualIndexes;
|
|
133
|
+
/**
|
|
134
|
+
* True when `inst` cannot be told apart from another instance in `list`.
|
|
135
|
+
* An unlabelled group only: no content of its own, or a content signature a
|
|
136
|
+
* peer shares.
|
|
137
|
+
*/
|
|
138
|
+
private isTwinWithin;
|
|
125
139
|
/**
|
|
126
140
|
* Instances sharing a template path are only twins while they look alike.
|
|
127
141
|
* Four rows from one `field()` helper are indistinguishable at register time
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoAnchorRegistry.d.ts","sourceRoot":"","sources":["../../../../../src/anchors/AutoAnchorRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUzD;;;;;;GAMG;AAEH,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAE3E,MAAM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O,MAAM,kBAAkB,oBAA2B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capture a release-stable fiber path for a host the Babel plugin never
|
|
3
|
+
* registered. `hostKind` and ids survive minification; `displayName` is only
|
|
4
|
+
* a tiebreaker at resolve time.
|
|
5
|
+
*/
|
|
6
|
+
import type { MobileFiberPath } from '@userflow-tech/protocol';
|
|
7
|
+
import { type AnyFiber } from './fiberInternals';
|
|
8
|
+
/**
|
|
9
|
+
* Root → leaf path from the enclosing screen (or the walk root) down to `host`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function fiberPathFromHost(host: AnyFiber): MobileFiberPath | null;
|
|
12
|
+
//# sourceMappingURL=fiberPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fiberPath.d.ts","sourceRoot":"","sources":["../../../../../../src/anchors/fiber/fiberPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,yBAAyB,CAAC;AAEnF,OAAO,EACL,KAAK,QAAQ,EAOd,MAAM,kBAAkB,CAAC;AAiE1B;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,GAAG,eAAe,GAAG,IAAI,CAiCxE"}
|
|
@@ -16,10 +16,11 @@ export type FindAnchorFiberResult = {
|
|
|
16
16
|
* tier that has any match so a testID hit is never made ambiguous by an
|
|
17
17
|
* unrelated accessibilityLabel.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
19
|
+
* A composite match resolves to the host beneath it that carries the same id
|
|
20
|
+
* (e.g. a tab item that wraps its button in a View and forwards testID to the
|
|
21
|
+
* button), else to its shallowest host descendant. Multiple matches on a single
|
|
22
|
+
* root-to-leaf chain (e.g. Pressable forwarding testID to its inner View)
|
|
23
|
+
* collapse to the outermost host. Disjoint matches fail closed as ambiguous.
|
|
23
24
|
*
|
|
24
25
|
* The walk never follows `rootFiber.sibling` so the Userflow overlay (a sibling
|
|
25
26
|
* of {@link FiberScanRoot} in UserflowProvider) cannot self-match SDK testIDs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findAnchorFiber.d.ts","sourceRoot":"","sources":["../../../../../../src/anchors/fiber/findAnchorFiber.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAOd,MAAM,kBAAkB,CAAC;AAa1B,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,GAAG,oBAAoB,CAAC;AAI1E,MAAM,MAAM,qBAAqB,GAC7B;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,GAC1D;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,GAC7C;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC;AAE1B
|
|
1
|
+
{"version":3,"file":"findAnchorFiber.d.ts","sourceRoot":"","sources":["../../../../../../src/anchors/fiber/findAnchorFiber.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAOd,MAAM,kBAAkB,CAAC;AAa1B,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,GAAG,oBAAoB,CAAC;AAI1E,MAAM,MAAM,qBAAqB,GAC7B;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,GAC1D;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,GAC7C;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,GAAG,qBAAqB,CAoEtF;AA6DD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,SAAQ,GAAG,QAAQ,GAAG,IAAI,CAkBxF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-resolve a fiber path captured from library UI the Babel plugin never
|
|
3
|
+
* stamped. Explicit leaf ids win. Otherwise score host kind, label, role, and
|
|
4
|
+
* path alignment, and fail closed when the best hit is weak or tied.
|
|
5
|
+
*/
|
|
6
|
+
import type { MobileFiberPath } from '@userflow-tech/protocol';
|
|
7
|
+
import { type AnyFiber } from './fiberInternals';
|
|
8
|
+
export type FiberPathResolution = {
|
|
9
|
+
status: 'found';
|
|
10
|
+
fiber: AnyFiber;
|
|
11
|
+
cacheId: string;
|
|
12
|
+
textDisagreed?: boolean;
|
|
13
|
+
} | {
|
|
14
|
+
status: 'ambiguous';
|
|
15
|
+
} | {
|
|
16
|
+
status: 'unknown';
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Resolve `path` to the live host it describes. A leaf `testID` is authoritative
|
|
20
|
+
* and reuses the manual fiber scan.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveFiberPath(path: MobileFiberPath | null | undefined): FiberPathResolution;
|
|
23
|
+
export declare function fibersMatch(a: AnyFiber, b: AnyFiber): boolean;
|
|
24
|
+
//# sourceMappingURL=resolveFiberPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveFiberPath.d.ts","sourceRoot":"","sources":["../../../../../../src/anchors/fiber/resolveFiberPath.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAsB,MAAM,yBAAyB,CAAC;AAWnF,OAAO,EACL,KAAK,QAAQ,EAQd,MAAM,kBAAkB,CAAC;AAQ1B,MAAM,MAAM,mBAAmB,GAC3B;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,GAC9E;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,GACvB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC;AAwI1B;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,GAAG,mBAAmB,CAkC9F;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAE7D"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geometry helpers for "what the user can actually see".
|
|
3
|
+
*
|
|
4
|
+
* `measureInWindow` reports a view's full layout rect, including the part
|
|
5
|
+
* scrolled under a tab bar or clipped by a ScrollView. Native hit-testing
|
|
6
|
+
* already accounts for that; the JS fallback and the tooltip tap rect do not,
|
|
7
|
+
* so they clip against scroll viewports and the topmost modal.
|
|
8
|
+
*/
|
|
9
|
+
import { type AnyFiber } from './fiberInternals';
|
|
10
|
+
export interface VisibleRect {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}
|
|
16
|
+
type MeasureCallback = (x: number, y: number, width: number, height: number) => void;
|
|
17
|
+
export declare function intersectRects(a: VisibleRect, b: VisibleRect): VisibleRect | null;
|
|
18
|
+
/**
|
|
19
|
+
* Intersect `rect` with every scroll viewport above `fiber` (innermost first).
|
|
20
|
+
* Returns null when the rect is entirely outside a viewport. No scroll ancestor
|
|
21
|
+
* leaves `rect` unchanged.
|
|
22
|
+
*/
|
|
23
|
+
export declare function clipToScrollViewports(fiber: AnyFiber | null, rect: VisibleRect): Promise<VisibleRect | null>;
|
|
24
|
+
/**
|
|
25
|
+
* The visible modal host drawn on top, or null. Later siblings win: React
|
|
26
|
+
* Native mounts a newer `<Modal>` after the previous one.
|
|
27
|
+
*/
|
|
28
|
+
export declare function topmostVisibleModalHost(root: AnyFiber | null, maxNodes?: number): AnyFiber | null;
|
|
29
|
+
/** True when `fiber` is `ancestor` or sits under it. */
|
|
30
|
+
export declare function fiberIsUnder(fiber: AnyFiber, ancestor: AnyFiber, maxDepth?: number): boolean;
|
|
31
|
+
export type { MeasureCallback };
|
|
32
|
+
//# sourceMappingURL=visibleRect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visibleRect.d.ts","sourceRoot":"","sources":["../../../../../../src/anchors/fiber/visibleRect.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,KAAK,QAAQ,EAOd,MAAM,kBAAkB,CAAC;AAI1B,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAOD,KAAK,eAAe,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;AA8BrF,wBAAgB,cAAc,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CASjF;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,QAAQ,GAAG,IAAI,EACtB,IAAI,EAAE,WAAW,GAChB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAgB7B;AAcD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI,EAAE,QAAQ,SAAQ,GAAG,QAAQ,GAAG,IAAI,CAwBhG;AAED,wDAAwD;AACxD,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,SAAS,GAAG,OAAO,CAQ5F;AAED,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -36,7 +36,12 @@ export declare function coveredScreenBranches(container: AnyFiber): Set<AnyFiber
|
|
|
36
36
|
*
|
|
37
37
|
* Needed in addition to scan-time pruning: a resolved anchor is cached, and the
|
|
38
38
|
* cache would otherwise keep serving a host after its screen was covered by a
|
|
39
|
-
* newly pushed one.
|
|
39
|
+
* newly pushed one.
|
|
40
40
|
*/
|
|
41
41
|
export declare function isFiberOnVisibleScreen(fiber: AnyFiber): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* When `fiber` is on a covered screen, the visible screens of the navigator
|
|
44
|
+
* that covers it, topmost first. Empty when `fiber` is visible.
|
|
45
|
+
*/
|
|
46
|
+
export declare function screensCoveringFiber(fiber: AnyFiber): AnyFiber[];
|
|
42
47
|
//# sourceMappingURL=visibleScreens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visibleScreens.d.ts","sourceRoot":"","sources":["../../../../../../src/anchors/fiber/visibleScreens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EACL,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"visibleScreens.d.ts","sourceRoot":"","sources":["../../../../../../src/anchors/fiber/visibleScreens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EACL,KAAK,QAAQ,EASd,MAAM,kBAAkB,CAAC;AAqB1B,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAG/D;AA8ED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,CAUxE;AA0BD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAQ/D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAWhE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded DFS under a fiber that skips screens the user cannot see.
|
|
3
|
+
*
|
|
4
|
+
* Same pruning as {@link findAnchorFiber}: covered navigator branches are not
|
|
5
|
+
* visited, but their siblings still are. The walk never follows `root.sibling`,
|
|
6
|
+
* so the Userflow overlay (a sibling of FiberScanRoot) stays out of the scan.
|
|
7
|
+
*/
|
|
8
|
+
import { type AnyFiber } from './fiberInternals';
|
|
9
|
+
/** Same cap as the anchor scan: several mounted screens of a modest app. */
|
|
10
|
+
export declare const WALK_VISIBLE_MAX_NODES = 60000;
|
|
11
|
+
export interface WalkVisibleFibersResult {
|
|
12
|
+
visited: number;
|
|
13
|
+
truncated: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Visit fibers under `root`, skipping covered screen branches.
|
|
17
|
+
* `visit` returning `false` stops the walk early.
|
|
18
|
+
*/
|
|
19
|
+
export declare function walkVisibleFibers(root: AnyFiber, visit: (fiber: AnyFiber) => void | false, maxNodes?: number): WalkVisibleFibersResult;
|
|
20
|
+
//# sourceMappingURL=walkVisibleFibers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walkVisibleFibers.d.ts","sourceRoot":"","sources":["../../../../../../src/anchors/fiber/walkVisibleFibers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,KAAK,QAAQ,EAAwB,MAAM,kBAAkB,CAAC;AAGvE,4EAA4E;AAC5E,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAE7C,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,KAAK,EACxC,QAAQ,SAAyB,GAChC,uBAAuB,CAsCzB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AutoAnchorInstance } from './AutoAnchorRegistry';
|
|
2
|
+
/**
|
|
3
|
+
* Whether a scored instance is on a screen the user can see.
|
|
4
|
+
*
|
|
5
|
+
* No fiber pointer means we cannot prove the host is covered (tests, and hosts
|
|
6
|
+
* whose public instance has no internals link) — same fail-open as apps without
|
|
7
|
+
* react-native-screens.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isInstanceOnVisibleScreen(inst: AutoAnchorInstance): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* One lazy host-fiber index and one verdict per instance, for a single pass.
|
|
12
|
+
*
|
|
13
|
+
* A factory rather than an extra argument: `Array.filter` passes the index as
|
|
14
|
+
* the second parameter. Sharing the index matters on Paper release builds,
|
|
15
|
+
* where a host ref cannot reach its fiber and each lookup would otherwise walk
|
|
16
|
+
* the tree.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createVisibleInstanceFilter(): (inst: AutoAnchorInstance) => boolean;
|
|
19
|
+
//# sourceMappingURL=isInstanceOnVisibleScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isInstanceOnVisibleScreen.d.ts","sourceRoot":"","sources":["../../../../../src/anchors/isInstanceOnVisibleScreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAsB/D;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAI3E;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,IAAI,CAAC,IAAI,EAAE,kBAAkB,KAAK,OAAO,CAWnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAutoAnchorHost.d.ts","sourceRoot":"","sources":["../../../../../src/anchors/resolveAutoAnchorHost.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"resolveAutoAnchorHost.d.ts","sourceRoot":"","sources":["../../../../../src/anchors/resolveAutoAnchorHost.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAMvD,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEvE,MAAM,MAAM,oBAAoB,GAC5B;IACE,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,GACD;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,WAAW,CAAA;CAAE,GAC5C;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,KAAK,CAAC,EAAE,WAAW,CAAA;CAAE,GACzC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAqG/C;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,GAAG,SAAS,GACnD,oBAAoB,CAoCtB"}
|