@userflow-tech/react-native 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +154 -79
- package/app.plugin.js +19 -1
- package/babel-plugin/index.d.ts +8 -8
- package/babel-plugin/index.d.ts.map +1 -1
- package/babel-plugin/index.js +70 -15
- package/babel-plugin/index.js.map +1 -1
- package/babel-plugin.js +21 -0
- package/docs/anchoring.md +141 -13
- package/docs/deep-linking.md +83 -43
- package/docs/isolation.md +75 -0
- package/docs/theme-mapping.md +44 -15
- package/docs/troubleshooting.md +73 -43
- package/docs/webview-custom-banner-poc.md +64 -0
- package/expo-plugin/withUserflow.d.ts +3 -2
- package/expo-plugin/withUserflow.d.ts.map +1 -1
- package/expo-plugin/withUserflow.js +15 -9
- package/expo-plugin/withUserflow.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +150 -2
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/anchorChangeTicker.js +10 -0
- package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -1
- package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -12
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js +11 -47
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +50 -0
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js +145 -3
- package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/commonjs/anchors/fiber/fiberPath.js +122 -0
- package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js +60 -50
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/commonjs/anchors/fiber/indexHostFibers.js +129 -0
- package/lib/commonjs/anchors/fiber/indexHostFibers.js.map +1 -0
- package/lib/commonjs/anchors/fiber/readHostContent.js +131 -0
- package/lib/commonjs/anchors/fiber/readHostContent.js.map +1 -0
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js +220 -0
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js +147 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js +73 -36
- package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js +66 -0
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/commonjs/anchors/fiberAnchorCache.js +50 -0
- package/lib/commonjs/anchors/fiberAnchorCache.js.map +1 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js +51 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +15 -21
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +178 -0
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/commonjs/anchors/semanticMatcher.js +303 -0
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
- package/lib/commonjs/anonymousId.js +4 -1
- package/lib/commonjs/anonymousId.js.map +1 -1
- package/lib/commonjs/authoring/ElementPickerOverlay.js +566 -0
- package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -0
- package/lib/commonjs/authoring/capturePickerScreenshot.js +73 -0
- package/lib/commonjs/authoring/capturePickerScreenshot.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeBarTransition.js +94 -0
- package/lib/commonjs/authoring/chrome/ChromeBarTransition.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +86 -0
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeButton.js +99 -0
- package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeDialog.js +131 -0
- package/lib/commonjs/authoring/chrome/ChromeDialog.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js +43 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeTooltip.js +88 -0
- package/lib/commonjs/authoring/chrome/ChromeTooltip.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js +123 -0
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +64 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +90 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/tokens.js +151 -0
- package/lib/commonjs/authoring/chrome/tokens.js.map +1 -0
- package/lib/commonjs/authoring/doubleTap.js +23 -0
- package/lib/commonjs/authoring/doubleTap.js.map +1 -0
- package/lib/commonjs/authoring/elementPickerController.js +102 -0
- package/lib/commonjs/authoring/elementPickerController.js.map +1 -0
- package/lib/commonjs/authoring/fingerprintFromInstance.js +395 -0
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/commonjs/authoring/hitTest.js +354 -0
- package/lib/commonjs/authoring/hitTest.js.map +1 -0
- package/lib/commonjs/authoring/hostAtPoint.js +204 -0
- package/lib/commonjs/authoring/hostAtPoint.js.map +1 -0
- package/lib/commonjs/content/BannerStepButton.js +68 -0
- package/lib/commonjs/content/BannerStepButton.js.map +1 -0
- package/lib/commonjs/content/RichContentRenderer.js +12 -2
- package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
- package/lib/commonjs/content/StepButton.js +19 -4
- package/lib/commonjs/content/StepButton.js.map +1 -1
- package/lib/commonjs/content/buttonAppearance.js +16 -0
- package/lib/commonjs/content/buttonAppearance.js.map +1 -1
- package/lib/commonjs/content/resolveBannerButtonChrome.js +44 -0
- package/lib/commonjs/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/commonjs/content/resolveStepButtonChrome.js +8 -6
- package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/commonjs/content/themeColor.js +26 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deepLinking.js +4 -4
- package/lib/commonjs/deviceContext.js +158 -0
- package/lib/commonjs/deviceContext.js.map +1 -0
- package/lib/commonjs/evalJs/EvalJsHost.js +244 -0
- package/lib/commonjs/evalJs/EvalJsHost.js.map +1 -0
- package/lib/commonjs/evalJs/bootstrap.js +84 -0
- package/lib/commonjs/evalJs/bootstrap.js.map +1 -0
- package/lib/commonjs/evalJs/bridgeMessages.js +143 -0
- package/lib/commonjs/evalJs/bridgeMessages.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsBridge.js +31 -0
- package/lib/commonjs/evalJs/evalJsBridge.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsController.js +124 -0
- package/lib/commonjs/evalJs/evalJsController.js.map +1 -0
- package/lib/commonjs/evalJs/getWebView.js +81 -0
- package/lib/commonjs/evalJs/getWebView.js.map +1 -0
- package/lib/commonjs/evalJs/injectEvalPending.js +19 -0
- package/lib/commonjs/evalJs/injectEvalPending.js.map +1 -0
- package/lib/commonjs/evalJs/types.js +2 -0
- package/lib/commonjs/evalJs/types.js.map +1 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js +40 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/commonjs/expo-router/index.js +19 -0
- package/lib/commonjs/expo-router/index.js.map +1 -1
- package/lib/commonjs/expo-router/redirectSystemPath.js +75 -0
- package/lib/commonjs/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +42 -6
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/commonjs/hostAppVersion.js +242 -0
- package/lib/commonjs/hostAppVersion.js.map +1 -0
- package/lib/commonjs/index.js +214 -26
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lifecycle.js +2 -0
- package/lib/commonjs/lifecycle.js.map +1 -1
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +22 -10
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/commonjs/navigation/isOverlayPresentation.js +64 -0
- package/lib/commonjs/navigation/isOverlayPresentation.js.map +1 -0
- package/lib/commonjs/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/commonjs/pairing/PairingController.js +272 -27
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +250 -84
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/commonjs/pairing/deepLink.js +22 -5
- package/lib/commonjs/pairing/deepLink.js.map +1 -1
- package/lib/commonjs/pairing/deviceId.js +47 -0
- package/lib/commonjs/pairing/deviceId.js.map +1 -0
- package/lib/commonjs/pairing/diagnostics.js +14 -4
- package/lib/commonjs/pairing/diagnostics.js.map +1 -1
- package/lib/commonjs/pairing/elementPickerRelay.js +91 -0
- package/lib/commonjs/pairing/elementPickerRelay.js.map +1 -0
- package/lib/commonjs/pairing/resolvePreviewChrome.js +52 -0
- package/lib/commonjs/pairing/resolvePreviewChrome.js.map +1 -0
- package/lib/commonjs/pairing/tokenStorage.js +72 -9
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +5 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/pairing/usePreviewBarHold.js +139 -0
- package/lib/commonjs/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/commonjs/runtime/BannerHost.js +96 -0
- package/lib/commonjs/runtime/BannerHost.js.map +1 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js +99 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js.map +1 -0
- package/lib/commonjs/runtime/FlowRenderer.js +45 -21
- package/lib/commonjs/runtime/FlowRenderer.js.map +1 -1
- package/lib/commonjs/runtime/FlowSurfaceFade.js +47 -24
- package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -1
- package/lib/commonjs/runtime/SdkErrorBoundary.js +61 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/commonjs/runtime/TargetPressBridge.js +27 -51
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowOverlay.js +97 -0
- package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -0
- package/lib/commonjs/runtime/UserflowProvider.js +154 -30
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/bannerEngine.js +63 -0
- package/lib/commonjs/runtime/bannerEngine.js.map +1 -0
- package/lib/commonjs/runtime/bannerEngineContext.js +11 -0
- package/lib/commonjs/runtime/bannerEngineContext.js.map +1 -0
- package/lib/commonjs/runtime/bannerPlacement.js +37 -0
- package/lib/commonjs/runtime/bannerPlacement.js.map +1 -0
- package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
- package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js +30 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +78 -4
- package/lib/commonjs/runtime/flowEngine.js.map +1 -1
- package/lib/commonjs/runtime/flowSessionViewState.js +32 -7
- package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -1
- package/lib/commonjs/runtime/isolateCall.js +48 -0
- package/lib/commonjs/runtime/isolateCall.js.map +1 -0
- package/lib/commonjs/runtime/reportSdkError.js +19 -0
- package/lib/commonjs/runtime/reportSdkError.js.map +1 -0
- package/lib/commonjs/runtime/useBannerSession.js +37 -0
- package/lib/commonjs/runtime/useBannerSession.js.map +1 -0
- package/lib/commonjs/runtime/useFlowSessionState.js +2 -1
- package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
- package/lib/commonjs/screenTracker.js +72 -5
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/surfaces/BannerBar.js +160 -0
- package/lib/commonjs/surfaces/BannerBar.js.map +1 -0
- package/lib/commonjs/surfaces/BannerSurface.js +78 -0
- package/lib/commonjs/surfaces/BannerSurface.js.map +1 -0
- package/lib/commonjs/surfaces/CardFade.js +31 -0
- package/lib/commonjs/surfaces/CardFade.js.map +1 -0
- package/lib/commonjs/surfaces/CloseButton.js +11 -6
- package/lib/commonjs/surfaces/CloseButton.js.map +1 -1
- package/lib/commonjs/surfaces/MadeWithUserflow.js +12 -8
- package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js +51 -35
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +383 -88
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/bannerBarLayout.js +88 -0
- package/lib/commonjs/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js +42 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +277 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js +46 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js +26 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +41 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +74 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js +152 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +148 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js +13 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js +49 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js +83 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/commonjs/surfaces/cardTransition.js +70 -0
- package/lib/commonjs/surfaces/cardTransition.js.map +1 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js +22 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/commonjs/surfaces/resolveHighlightChrome.js +109 -0
- package/lib/commonjs/surfaces/resolveHighlightChrome.js.map +1 -0
- package/lib/commonjs/surfaces/resolveModalLayout.js +7 -3
- package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -1
- package/lib/commonjs/surfaces/resolveTooltipLayout.js +0 -4
- package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -1
- package/lib/commonjs/surfaces/safeArea.js +23 -0
- package/lib/commonjs/surfaces/safeArea.js.map +1 -1
- package/lib/commonjs/surfaces/surfaceInteractionConfig.js +33 -0
- package/lib/commonjs/surfaces/surfaceInteractionConfig.js.map +1 -0
- package/lib/commonjs/surfaces/surfaceLayoutInsets.js +128 -0
- package/lib/commonjs/surfaces/surfaceLayoutInsets.js.map +1 -0
- package/lib/commonjs/surfaces/themeChrome.js +4 -1
- package/lib/commonjs/surfaces/themeChrome.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +142 -21
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +100 -47
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js +124 -0
- package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +67 -13
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +88 -19
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js +52 -0
- package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/rect.js +12 -0
- package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js +103 -0
- package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +151 -2
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/anchorChangeTicker.js +10 -0
- package/lib/module/anchors/anchorChangeTicker.js.map +1 -1
- package/lib/module/anchors/elementConditionEvaluator.js +25 -12
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRoot.js +2 -43
- package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRootStore.js +46 -0
- package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -0
- package/lib/module/anchors/fiber/fiberInternals.js +139 -3
- package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/module/anchors/fiber/fiberPath.js +118 -0
- package/lib/module/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js +60 -50
- package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/module/anchors/fiber/indexHostFibers.js +122 -0
- package/lib/module/anchors/fiber/indexHostFibers.js.map +1 -0
- package/lib/module/anchors/fiber/readHostContent.js +127 -0
- package/lib/module/anchors/fiber/readHostContent.js.map +1 -0
- package/lib/module/anchors/fiber/resolveFiberPath.js +215 -0
- package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/visibleRect.js +139 -0
- package/lib/module/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/module/anchors/fiber/visibleScreens.js +73 -37
- package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/module/anchors/fiber/walkVisibleFibers.js +61 -0
- package/lib/module/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/module/anchors/fiberAnchorCache.js +40 -0
- package/lib/module/anchors/fiberAnchorCache.js.map +1 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js +46 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +15 -21
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveAutoAnchorHost.js +174 -0
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/module/anchors/semanticMatcher.js +297 -0
- package/lib/module/anchors/semanticMatcher.js.map +1 -0
- package/lib/module/anonymousId.js +4 -2
- package/lib/module/anonymousId.js.map +1 -1
- package/lib/module/authoring/ElementPickerOverlay.js +561 -0
- package/lib/module/authoring/ElementPickerOverlay.js.map +1 -0
- package/lib/module/authoring/capturePickerScreenshot.js +68 -0
- package/lib/module/authoring/capturePickerScreenshot.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeBarTransition.js +88 -0
- package/lib/module/authoring/chrome/ChromeBarTransition.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeBottomSheet.js +81 -0
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeButton.js +94 -0
- package/lib/module/authoring/chrome/ChromeButton.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeDialog.js +126 -0
- package/lib/module/authoring/chrome/ChromeDialog.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeIcon.js +37 -0
- package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeTooltip.js +82 -0
- package/lib/module/authoring/chrome/ChromeTooltip.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeTopBar.js +117 -0
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js +59 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js +85 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark@3x.png +0 -0
- package/lib/module/authoring/chrome/tokens.js +147 -0
- package/lib/module/authoring/chrome/tokens.js.map +1 -0
- package/lib/module/authoring/doubleTap.js +18 -0
- package/lib/module/authoring/doubleTap.js.map +1 -0
- package/lib/module/authoring/elementPickerController.js +97 -0
- package/lib/module/authoring/elementPickerController.js.map +1 -0
- package/lib/module/authoring/fingerprintFromInstance.js +381 -0
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/module/authoring/hitTest.js +346 -0
- package/lib/module/authoring/hitTest.js.map +1 -0
- package/lib/module/authoring/hostAtPoint.js +199 -0
- package/lib/module/authoring/hostAtPoint.js.map +1 -0
- package/lib/module/content/BannerStepButton.js +63 -0
- package/lib/module/content/BannerStepButton.js.map +1 -0
- package/lib/module/content/RichContentRenderer.js +12 -2
- package/lib/module/content/RichContentRenderer.js.map +1 -1
- package/lib/module/content/StepButton.js +19 -4
- package/lib/module/content/StepButton.js.map +1 -1
- package/lib/module/content/buttonAppearance.js +14 -0
- package/lib/module/content/buttonAppearance.js.map +1 -1
- package/lib/module/content/resolveBannerButtonChrome.js +41 -0
- package/lib/module/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/module/content/resolveStepButtonChrome.js +8 -6
- package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/module/content/themeColor.js +24 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deepLinking.js +4 -4
- package/lib/module/deviceContext.js +142 -0
- package/lib/module/deviceContext.js.map +1 -0
- package/lib/module/evalJs/EvalJsHost.js +239 -0
- package/lib/module/evalJs/EvalJsHost.js.map +1 -0
- package/lib/module/evalJs/bootstrap.js +76 -0
- package/lib/module/evalJs/bootstrap.js.map +1 -0
- package/lib/module/evalJs/bridgeMessages.js +139 -0
- package/lib/module/evalJs/bridgeMessages.js.map +1 -0
- package/lib/module/evalJs/evalJsBridge.js +25 -0
- package/lib/module/evalJs/evalJsBridge.js.map +1 -0
- package/lib/module/evalJs/evalJsController.js +119 -0
- package/lib/module/evalJs/evalJsController.js.map +1 -0
- package/lib/module/evalJs/getWebView.js +76 -0
- package/lib/module/evalJs/getWebView.js.map +1 -0
- package/lib/module/evalJs/injectEvalPending.js +15 -0
- package/lib/module/evalJs/injectEvalPending.js.map +1 -0
- package/lib/module/evalJs/types.js +2 -0
- package/lib/module/evalJs/types.js.map +1 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js +35 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/module/expo-router/index.js +1 -0
- package/lib/module/expo-router/index.js.map +1 -1
- package/lib/module/expo-router/redirectSystemPath.js +70 -0
- package/lib/module/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +44 -8
- package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/module/hostAppVersion.js +225 -0
- package/lib/module/hostAppVersion.js.map +1 -0
- package/lib/module/index.js +211 -29
- package/lib/module/index.js.map +1 -1
- package/lib/module/lifecycle.js +2 -0
- package/lib/module/lifecycle.js.map +1 -1
- package/lib/module/navigation/WithUserflowReactNavigation.js +23 -11
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/module/navigation/isOverlayPresentation.js +58 -0
- package/lib/module/navigation/isOverlayPresentation.js.map +1 -0
- package/lib/module/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/module/pairing/PairingController.js +273 -28
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +250 -85
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/module/pairing/deepLink.js +21 -5
- package/lib/module/pairing/deepLink.js.map +1 -1
- package/lib/module/pairing/deviceId.js +41 -0
- package/lib/module/pairing/deviceId.js.map +1 -0
- package/lib/module/pairing/diagnostics.js +13 -4
- package/lib/module/pairing/diagnostics.js.map +1 -1
- package/lib/module/pairing/elementPickerRelay.js +87 -0
- package/lib/module/pairing/elementPickerRelay.js.map +1 -0
- package/lib/module/pairing/resolvePreviewChrome.js +48 -0
- package/lib/module/pairing/resolvePreviewChrome.js.map +1 -0
- package/lib/module/pairing/tokenStorage.js +71 -9
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +5 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/pairing/usePreviewBarHold.js +134 -0
- package/lib/module/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/module/runtime/BannerHost.js +92 -0
- package/lib/module/runtime/BannerHost.js.map +1 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js +94 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js.map +1 -0
- package/lib/module/runtime/FlowRenderer.js +45 -21
- package/lib/module/runtime/FlowRenderer.js.map +1 -1
- package/lib/module/runtime/FlowSurfaceFade.js +49 -26
- package/lib/module/runtime/FlowSurfaceFade.js.map +1 -1
- package/lib/module/runtime/SdkErrorBoundary.js +55 -0
- package/lib/module/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/module/runtime/TargetPressBridge.js +27 -51
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowOverlay.js +92 -0
- package/lib/module/runtime/UserflowOverlay.js.map +1 -0
- package/lib/module/runtime/UserflowProvider.js +155 -31
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/bannerEngine.js +55 -0
- package/lib/module/runtime/bannerEngine.js.map +1 -0
- package/lib/module/runtime/bannerEngineContext.js +7 -0
- package/lib/module/runtime/bannerEngineContext.js.map +1 -0
- package/lib/module/runtime/bannerPlacement.js +30 -0
- package/lib/module/runtime/bannerPlacement.js.map +1 -0
- package/lib/module/runtime/changedTouchPoints.js +43 -0
- package/lib/module/runtime/changedTouchPoints.js.map +1 -0
- package/lib/module/runtime/embedBannerRegistry.js +24 -0
- package/lib/module/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +75 -4
- package/lib/module/runtime/flowEngine.js.map +1 -1
- package/lib/module/runtime/flowSessionViewState.js +32 -7
- package/lib/module/runtime/flowSessionViewState.js.map +1 -1
- package/lib/module/runtime/isolateCall.js +43 -0
- package/lib/module/runtime/isolateCall.js.map +1 -0
- package/lib/module/runtime/reportSdkError.js +15 -0
- package/lib/module/runtime/reportSdkError.js.map +1 -0
- package/lib/module/runtime/useBannerSession.js +33 -0
- package/lib/module/runtime/useBannerSession.js.map +1 -0
- package/lib/module/runtime/useFlowSessionState.js +2 -1
- package/lib/module/runtime/useFlowSessionState.js.map +1 -1
- package/lib/module/screenTracker.js +67 -5
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/surfaces/BannerBar.js +155 -0
- package/lib/module/surfaces/BannerBar.js.map +1 -0
- package/lib/module/surfaces/BannerSurface.js +72 -0
- package/lib/module/surfaces/BannerSurface.js.map +1 -0
- package/lib/module/surfaces/CardFade.js +26 -0
- package/lib/module/surfaces/CardFade.js.map +1 -0
- package/lib/module/surfaces/CloseButton.js +10 -6
- package/lib/module/surfaces/CloseButton.js.map +1 -1
- package/lib/module/surfaces/MadeWithUserflow.js +11 -7
- package/lib/module/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/module/surfaces/ModalSurface.js +53 -37
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +385 -91
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/bannerBarLayout.js +69 -0
- package/lib/module/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/module/surfaces/bannerBarTokens.js +37 -0
- package/lib/module/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +272 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js +42 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js +19 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +35 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +69 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js +148 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +143 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js +9 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js +42 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js +79 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/module/surfaces/cardTransition.js +64 -0
- package/lib/module/surfaces/cardTransition.js.map +1 -0
- package/lib/module/surfaces/resolveBannerTheme.js +16 -0
- package/lib/module/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/module/surfaces/resolveHighlightChrome.js +102 -0
- package/lib/module/surfaces/resolveHighlightChrome.js.map +1 -0
- package/lib/module/surfaces/resolveModalLayout.js +7 -3
- package/lib/module/surfaces/resolveModalLayout.js.map +1 -1
- package/lib/module/surfaces/resolveTooltipLayout.js +1 -4
- package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -1
- package/lib/module/surfaces/safeArea.js +22 -0
- package/lib/module/surfaces/safeArea.js.map +1 -1
- package/lib/module/surfaces/surfaceInteractionConfig.js +27 -0
- package/lib/module/surfaces/surfaceInteractionConfig.js.map +1 -0
- package/lib/module/surfaces/surfaceLayoutInsets.js +119 -0
- package/lib/module/surfaces/surfaceLayoutInsets.js.map +1 -0
- package/lib/module/surfaces/themeChrome.js +3 -1
- package/lib/module/surfaces/themeChrome.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipBubble.js +143 -22
- package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipCutout.js +100 -47
- package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipHighlight.js +118 -0
- package/lib/module/surfaces/tooltip/TooltipHighlight.js.map +1 -0
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js +67 -13
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +87 -19
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
- package/lib/module/surfaces/tooltip/placementDiagnostics.js +43 -0
- package/lib/module/surfaces/tooltip/placementDiagnostics.js.map +1 -0
- package/lib/module/surfaces/tooltip/rect.js +11 -0
- package/lib/module/surfaces/tooltip/rect.js.map +1 -1
- package/lib/module/surfaces/tooltip/resolveSideCardWidth.js +96 -0
- package/lib/module/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +40 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +14 -10
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +42 -1
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts +42 -0
- package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts +17 -0
- package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +5 -5
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +50 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts +1 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +8 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts +11 -0
- package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +24 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts +20 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts +14 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +13 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +33 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +31 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +142 -0
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts +14 -0
- package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +58 -0
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +81 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +75 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +6 -1
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +4 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +7 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/types.d.ts +1 -0
- package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/deepLinking.d.ts +4 -4
- package/lib/typescript/commonjs/src/deviceContext.d.ts +66 -0
- package/lib/typescript/commonjs/src/deviceContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hostAppVersion.d.ts +69 -0
- package/lib/typescript/commonjs/src/hostAppVersion.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +69 -3
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts +10 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts +14 -0
- package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +78 -4
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +14 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +8 -2
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts +11 -0
- package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts +16 -0
- package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +16 -2
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +6 -3
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +20 -7
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +5 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +15 -7
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +25 -1
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +12 -3
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts +20 -0
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +1 -0
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/screenTracker.d.ts +26 -4
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts +12 -0
- package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -2
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +12 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts +31 -0
- package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts +44 -0
- package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +0 -7
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +3 -1
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +2 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +40 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +2 -0
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +14 -10
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +42 -1
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts +42 -0
- package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts +17 -0
- package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +5 -5
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +50 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/module/src/anonymousId.d.ts +1 -0
- package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +8 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts +11 -0
- package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +24 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts +20 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts +14 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +13 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +33 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +31 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +142 -0
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/doubleTap.d.ts +14 -0
- package/lib/typescript/module/src/authoring/doubleTap.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts +58 -0
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +81 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts +75 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts.map +1 -0
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts +6 -1
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -1
- package/lib/typescript/module/src/content/buttonAppearance.d.ts +4 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/module/src/content/themeColor.d.ts +7 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/module/src/content/types.d.ts +1 -0
- package/lib/typescript/module/src/content/types.d.ts.map +1 -1
- package/lib/typescript/module/src/deepLinking.d.ts +4 -4
- package/lib/typescript/module/src/deviceContext.d.ts +66 -0
- package/lib/typescript/module/src/deviceContext.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/module/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
- package/lib/typescript/module/src/hostAppVersion.d.ts +69 -0
- package/lib/typescript/module/src/hostAppVersion.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +69 -3
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/lifecycle.d.ts +10 -1
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts +14 -0
- package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PairingController.d.ts +78 -4
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +14 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/module/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +8 -2
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts +11 -0
- package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts +16 -0
- package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +16 -2
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +6 -3
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +20 -7
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +5 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +15 -7
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts +10 -0
- package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts +25 -1
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +12 -3
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/isolateCall.d.ts +20 -0
- package/lib/typescript/module/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +1 -0
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -1
- package/lib/typescript/module/src/screenTracker.d.ts +26 -4
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/CardFade.d.ts +12 -0
- package/lib/typescript/module/src/surfaces/CardFade.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -2
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +12 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/cardTransition.d.ts +31 -0
- package/lib/typescript/module/src/surfaces/cardTransition.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts +44 -0
- package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +0 -7
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/safeArea.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
- package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts +3 -1
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
- package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +2 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
- package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +24 -17
- package/src/anchors/AutoAnchorRegistry.ts +169 -2
- package/src/anchors/anchorChangeTicker.ts +10 -0
- package/src/anchors/elementConditionEvaluator.ts +29 -16
- package/src/anchors/fiber/FiberScanRoot.tsx +2 -50
- package/src/anchors/fiber/FiberScanRootStore.ts +51 -0
- package/src/anchors/fiber/fiberInternals.ts +166 -3
- package/src/anchors/fiber/fiberPath.ts +117 -0
- package/src/anchors/fiber/findAnchorFiber.ts +57 -47
- package/src/anchors/fiber/indexHostFibers.ts +136 -0
- package/src/anchors/fiber/readHostContent.ts +146 -0
- package/src/anchors/fiber/resolveFiberPath.ts +215 -0
- package/src/anchors/fiber/visibleRect.ts +153 -0
- package/src/anchors/fiber/visibleScreens.ts +74 -36
- package/src/anchors/fiber/walkVisibleFibers.ts +65 -0
- package/src/anchors/fiberAnchorCache.ts +45 -0
- package/src/anchors/isInstanceOnVisibleScreen.ts +55 -0
- package/src/anchors/resolveAnchorHost.ts +23 -23
- package/src/anchors/resolveAutoAnchorHost.ts +182 -0
- package/src/anchors/semanticMatcher.ts +385 -0
- package/src/anonymousId.ts +2 -1
- package/src/authoring/ElementPickerOverlay.tsx +662 -0
- package/src/authoring/capturePickerScreenshot.ts +90 -0
- package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
- package/src/authoring/chrome/ChromeBottomSheet.tsx +110 -0
- package/src/authoring/chrome/ChromeButton.tsx +108 -0
- package/src/authoring/chrome/ChromeDialog.tsx +121 -0
- package/src/authoring/chrome/ChromeIcon.tsx +49 -0
- package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
- package/src/authoring/chrome/ChromeTopBar.tsx +150 -0
- package/src/authoring/chrome/DoubleTapBridge.tsx +67 -0
- package/src/authoring/chrome/doubleTapMonitor.ts +90 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/src/authoring/chrome/icons/xmark.png +0 -0
- package/src/authoring/chrome/icons/xmark@2x.png +0 -0
- package/src/authoring/chrome/icons/xmark@3x.png +0 -0
- package/src/authoring/chrome/tokens.ts +111 -0
- package/src/authoring/doubleTap.ts +27 -0
- package/src/authoring/elementPickerController.ts +133 -0
- package/src/authoring/fingerprintFromInstance.ts +318 -0
- package/src/authoring/hitTest.ts +441 -0
- package/src/authoring/hostAtPoint.ts +247 -0
- package/src/content/BannerStepButton.tsx +91 -0
- package/src/content/RichContentRenderer.tsx +22 -1
- package/src/content/StepButton.tsx +17 -2
- package/src/content/buttonAppearance.ts +16 -0
- package/src/content/resolveBannerButtonChrome.ts +49 -0
- package/src/content/resolveStepButtonChrome.ts +12 -6
- package/src/content/themeColor.ts +25 -0
- package/src/content/types.ts +1 -0
- package/src/deepLinking.ts +4 -4
- package/src/deviceContext.ts +168 -0
- package/src/evalJs/EvalJsHost.tsx +255 -0
- package/src/evalJs/bootstrap.ts +83 -0
- package/src/evalJs/bridgeMessages.ts +134 -0
- package/src/evalJs/evalJsBridge.ts +42 -0
- package/src/evalJs/evalJsController.ts +127 -0
- package/src/evalJs/getWebView.ts +124 -0
- package/src/evalJs/injectEvalPending.ts +14 -0
- package/src/evalJs/types.ts +56 -0
- package/src/evalJs/useEvalJsWebViewInjection.ts +37 -0
- package/src/expo-router/index.ts +8 -0
- package/src/expo-router/redirectSystemPath.ts +86 -0
- package/src/expo-router/useUserflowExpoRouter.ts +49 -6
- package/src/hostAppVersion.ts +258 -0
- package/src/index.ts +255 -27
- package/src/lifecycle.ts +12 -1
- package/src/navigation/WithUserflowReactNavigation.tsx +26 -7
- package/src/navigation/isOverlayPresentation.ts +76 -0
- package/src/navigation/openFlowNavigateUrl.ts +12 -5
- package/src/pairing/PairingController.ts +311 -28
- package/src/pairing/PreviewModeBanner.tsx +307 -94
- package/src/pairing/deepLink.ts +23 -5
- package/src/pairing/deviceId.ts +43 -0
- package/src/pairing/diagnostics.ts +14 -4
- package/src/pairing/elementPickerRelay.ts +100 -0
- package/src/pairing/resolvePreviewChrome.ts +57 -0
- package/src/pairing/tokenStorage.ts +91 -9
- package/src/pairing/usePairingState.ts +4 -0
- package/src/pairing/usePreviewBarHold.ts +160 -0
- package/src/runtime/BannerHost.tsx +102 -0
- package/src/runtime/EmbedBannerPlaceholder.tsx +115 -0
- package/src/runtime/FlowRenderer.tsx +55 -27
- package/src/runtime/FlowSurfaceFade.tsx +51 -30
- package/src/runtime/SdkErrorBoundary.tsx +77 -0
- package/src/runtime/TargetPressBridge.tsx +29 -40
- package/src/runtime/UserflowOverlay.tsx +118 -0
- package/src/runtime/UserflowProvider.tsx +162 -24
- package/src/runtime/bannerEngine.ts +55 -0
- package/src/runtime/bannerEngineContext.ts +5 -0
- package/src/runtime/bannerPlacement.ts +36 -0
- package/src/runtime/changedTouchPoints.ts +34 -0
- package/src/runtime/embedBannerRegistry.ts +28 -0
- package/src/runtime/flowEngine.ts +78 -3
- package/src/runtime/flowSessionViewState.ts +42 -4
- package/src/runtime/isolateCall.ts +53 -0
- package/src/runtime/reportSdkError.ts +12 -0
- package/src/runtime/useBannerSession.ts +35 -0
- package/src/runtime/useFlowSessionState.ts +2 -0
- package/src/screenTracker.ts +73 -5
- package/src/surfaces/BannerBar.tsx +176 -0
- package/src/surfaces/BannerSurface.tsx +82 -0
- package/src/surfaces/CardFade.tsx +18 -0
- package/src/surfaces/CloseButton.tsx +17 -7
- package/src/surfaces/MadeWithUserflow.tsx +15 -10
- package/src/surfaces/ModalSurface.tsx +49 -36
- package/src/surfaces/TooltipSurface.tsx +423 -87
- package/src/surfaces/bannerBarLayout.ts +74 -0
- package/src/surfaces/bannerBarTokens.ts +34 -0
- package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +312 -0
- package/src/surfaces/bannerWebView/bannerAutoRunEvalJs.ts +44 -0
- package/src/surfaces/bannerWebView/bannerAutoRunSession.ts +19 -0
- package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +38 -0
- package/src/surfaces/bannerWebView/bannerThemeStyles.ts +91 -0
- package/src/surfaces/bannerWebView/bannerWebFrameCss.ts +145 -0
- package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +178 -0
- package/src/surfaces/bannerWebView/buttonClassName.ts +15 -0
- package/src/surfaces/bannerWebView/resolveCdnHost.ts +47 -0
- package/src/surfaces/bannerWebView/richContentDocToHtml.ts +99 -0
- package/src/surfaces/cardTransition.ts +67 -0
- package/src/surfaces/resolveBannerTheme.ts +18 -0
- package/src/surfaces/resolveHighlightChrome.ts +139 -0
- package/src/surfaces/resolveModalLayout.ts +16 -8
- package/src/surfaces/resolveTooltipLayout.ts +1 -14
- package/src/surfaces/safeArea.ts +29 -0
- package/src/surfaces/surfaceInteractionConfig.ts +25 -0
- package/src/surfaces/surfaceLayoutInsets.tsx +135 -0
- package/src/surfaces/themeChrome.ts +5 -3
- package/src/surfaces/tooltip/TooltipBubble.tsx +154 -19
- package/src/surfaces/tooltip/TooltipCutout.tsx +106 -49
- package/src/surfaces/tooltip/TooltipHighlight.tsx +144 -0
- package/src/surfaces/tooltip/computeTooltipPosition.ts +98 -12
- package/src/surfaces/tooltip/inferTooltipPlacement.ts +107 -18
- package/src/surfaces/tooltip/placementDiagnostics.ts +70 -0
- package/src/surfaces/tooltip/rect.ts +11 -0
- package/src/surfaces/tooltip/resolveSideCardWidth.ts +121 -0
- package/src/version.ts +1 -1
- package/vendor/core/dist/attributes.d.ts +1 -2
- package/vendor/core/dist/attributes.d.ts.map +1 -1
- package/vendor/core/dist/attributes.js +4 -4
- package/vendor/core/dist/attributes.js.map +1 -1
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts +73 -0
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js +236 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -0
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +109 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.js +417 -17
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +82 -3
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +122 -11
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +33 -5
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +107 -24
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/engine/conditionOperators.d.ts +16 -0
- package/vendor/core/dist/engine/conditionOperators.d.ts.map +1 -0
- package/vendor/core/dist/engine/conditionOperators.js +168 -0
- package/vendor/core/dist/engine/conditionOperators.js.map +1 -0
- package/vendor/core/dist/engine/handleActions.d.ts +43 -6
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +145 -15
- package/vendor/core/dist/engine/handleActions.js.map +1 -1
- package/vendor/core/dist/engine/simpleObservable.d.ts +13 -0
- package/vendor/core/dist/engine/simpleObservable.d.ts.map +1 -0
- package/vendor/core/dist/engine/simpleObservable.js +29 -0
- package/vendor/core/dist/engine/simpleObservable.js.map +1 -0
- package/vendor/core/dist/engine/trackCondition.d.ts +27 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackCondition.js +179 -0
- package/vendor/core/dist/engine/trackCondition.js.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +31 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.js +75 -0
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
- package/vendor/core/dist/errors.d.ts +11 -1
- package/vendor/core/dist/errors.d.ts.map +1 -1
- package/vendor/core/dist/errors.js +2 -1
- package/vendor/core/dist/errors.js.map +1 -1
- package/vendor/core/dist/eventAttributes.d.ts.map +1 -1
- package/vendor/core/dist/eventAttributes.js +4 -2
- package/vendor/core/dist/eventAttributes.js.map +1 -1
- package/vendor/core/dist/index.d.ts +7 -3
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +3 -1
- package/vendor/core/dist/index.js.map +1 -1
- package/vendor/core/dist/normalizeAttributes.d.ts +8 -0
- package/vendor/core/dist/normalizeAttributes.d.ts.map +1 -0
- package/vendor/core/dist/normalizeAttributes.js +129 -0
- package/vendor/core/dist/normalizeAttributes.js.map +1 -0
- package/vendor/core/dist/transport/pairing.d.ts +5 -0
- package/vendor/core/dist/transport/pairing.d.ts.map +1 -1
- package/vendor/core/dist/transport/pairing.js +69 -2
- package/vendor/core/dist/transport/pairing.js.map +1 -1
- package/vendor/core/dist/transport/phoenix.d.ts +19 -6
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +75 -7
- package/vendor/core/dist/transport/phoenix.js.map +1 -1
- package/vendor/core/dist/types.d.ts +26 -1
- package/vendor/core/dist/types.d.ts.map +1 -1
- package/vendor/core/dist/version.d.ts +1 -1
- package/vendor/core/dist/version.js +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/dist/attributes.d.ts +43 -0
- package/vendor/protocol/dist/attributes.d.ts.map +1 -0
- package/vendor/protocol/dist/attributes.js +15 -0
- package/vendor/protocol/dist/attributes.js.map +1 -0
- package/vendor/protocol/dist/autoData.d.ts +10 -17
- package/vendor/protocol/dist/autoData.d.ts.map +1 -1
- package/vendor/protocol/dist/autoData.js +2 -2
- package/vendor/protocol/dist/autoData.js.map +1 -1
- package/vendor/protocol/dist/events.d.ts +8 -0
- package/vendor/protocol/dist/events.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.d.ts +124 -6
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.js +70 -5
- package/vendor/protocol/dist/flows.js.map +1 -1
- package/vendor/protocol/dist/index.d.ts +1 -0
- package/vendor/protocol/dist/index.d.ts.map +1 -1
- package/vendor/protocol/dist/index.js +1 -0
- package/vendor/protocol/dist/index.js.map +1 -1
- package/vendor/protocol/dist/messages.d.ts +46 -15
- package/vendor/protocol/dist/messages.d.ts.map +1 -1
- package/vendor/protocol/dist/messages.js +9 -2
- package/vendor/protocol/dist/messages.js.map +1 -1
- package/vendor/protocol/dist/pairing.d.ts +26 -0
- package/vendor/protocol/dist/pairing.d.ts.map +1 -1
- package/vendor/protocol/dist/pairing.js.map +1 -1
- package/vendor/protocol/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["autoRunCompletedSessionIds","Set","shouldSkipBannerAutoRunEval","sessionId","has","markBannerAutoRunEvalComplete","add","clearBannerAutoRunEvalSession","delete","resetBannerAutoRunSessionsForTests","clear"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/bannerAutoRunSession.ts"],"mappings":";;AAAA;AACA,MAAMA,0BAA0B,GAAG,IAAIC,GAAG,CAAS,CAAC;AAEpD,OAAO,SAASC,2BAA2BA,CAACC,SAAiB,EAAW;EACtE,OAAOH,0BAA0B,CAACI,GAAG,CAACD,SAAS,CAAC;AAClD;AAEA,OAAO,SAASE,6BAA6BA,CAACF,SAAiB,EAAQ;EACrEH,0BAA0B,CAACM,GAAG,CAACH,SAAS,CAAC;AAC3C;AAEA,OAAO,SAASI,6BAA6BA,CAACJ,SAAiB,EAAQ;EACrEH,0BAA0B,CAACQ,MAAM,CAACL,SAAS,CAAC;AAC9C;;AAEA;AACA,OAAO,SAASM,kCAAkCA,CAAA,EAAS;EACzDT,0BAA0B,CAACU,KAAK,CAAC,CAAC;AACpC","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { FlowActionType } from '@userflow-tech/protocol';
|
|
4
|
+
import { themeHasPublishedCustomCss } from "./resolveCdnHost.js";
|
|
5
|
+
let debugForceWebViewBanner = false;
|
|
6
|
+
|
|
7
|
+
/** POC / local testing when the builder flag is not on the wire yet. */
|
|
8
|
+
export function setDebugForceWebViewBanner(enabled) {
|
|
9
|
+
debugForceWebViewBanner = enabled;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export function resetDebugForceWebViewBannerForTests() {
|
|
14
|
+
debugForceWebViewBanner = false;
|
|
15
|
+
}
|
|
16
|
+
function bannerHasEvalJsAction(banner) {
|
|
17
|
+
return banner.buttons.some(button => button.actions.some(action => action.type === FlowActionType.EVAL_JS));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Use the WebView banner renderer when any button runs Evaluate JavaScript
|
|
22
|
+
* (needs the shared eval page), when the theme has published custom CSS
|
|
23
|
+
* (`.userflow-custom-container-*` / `.userflow-custom-button-*` via CDN),
|
|
24
|
+
* or when {@link setDebugForceWebViewBanner} is true.
|
|
25
|
+
*/
|
|
26
|
+
export function bannerNeedsWebView(banner, theme) {
|
|
27
|
+
if (debugForceWebViewBanner) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
if (theme != null && themeHasPublishedCustomCss(theme)) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
return bannerHasEvalJsAction(banner);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=bannerNeedsWebView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FlowActionType","themeHasPublishedCustomCss","debugForceWebViewBanner","setDebugForceWebViewBanner","enabled","resetDebugForceWebViewBannerForTests","bannerHasEvalJsAction","banner","buttons","some","button","actions","action","type","EVAL_JS","bannerNeedsWebView","theme"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/bannerNeedsWebView.ts"],"mappings":";;AACA,SAASA,cAAc,QAAQ,yBAAyB;AAExD,SAASC,0BAA0B,QAAQ,qBAAkB;AAE7D,IAAIC,uBAAuB,GAAG,KAAK;;AAEnC;AACA,OAAO,SAASC,0BAA0BA,CAACC,OAAgB,EAAQ;EACjEF,uBAAuB,GAAGE,OAAO;AACnC;;AAEA;AACA,OAAO,SAASC,oCAAoCA,CAAA,EAAS;EAC3DH,uBAAuB,GAAG,KAAK;AACjC;AAEA,SAASI,qBAAqBA,CAACC,MAAsB,EAAW;EAC9D,OAAOA,MAAM,CAACC,OAAO,CAACC,IAAI,CAAEC,MAAM,IAChCA,MAAM,CAACC,OAAO,CAACF,IAAI,CAAEG,MAAM,IAAKA,MAAM,CAACC,IAAI,KAAKb,cAAc,CAACc,OAAO,CACxE,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAACR,MAAsB,EAAES,KAA4B,EAAW;EAChG,IAAId,uBAAuB,EAAE;IAC3B,OAAO,IAAI;EACb;EACA,IAAIc,KAAK,IAAI,IAAI,IAAIf,0BAA0B,CAACe,KAAK,CAAC,EAAE;IACtD,OAAO,IAAI;EACb;EACA,OAAOV,qBAAqB,CAACC,MAAM,CAAC;AACtC","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { resolveBannerBackgroundColor, resolveBannerForegroundColor } from "../resolveBannerTheme.js";
|
|
4
|
+
function readString(theme, key, fallback) {
|
|
5
|
+
const value = theme[key];
|
|
6
|
+
if (typeof value === 'string' && value.trim()) {
|
|
7
|
+
return value.trim();
|
|
8
|
+
}
|
|
9
|
+
return fallback;
|
|
10
|
+
}
|
|
11
|
+
function readNumber(theme, key, fallback) {
|
|
12
|
+
const value = theme[key];
|
|
13
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
if (typeof value === 'string') {
|
|
17
|
+
const parsed = parseFloat(value);
|
|
18
|
+
if (Number.isFinite(parsed)) {
|
|
19
|
+
return parsed;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return fallback;
|
|
23
|
+
}
|
|
24
|
+
function readCssLength(theme, key, fallbackPx) {
|
|
25
|
+
const value = theme[key];
|
|
26
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
27
|
+
return `${value}px`;
|
|
28
|
+
}
|
|
29
|
+
if (typeof value === 'string' && value.trim()) {
|
|
30
|
+
return value.trim();
|
|
31
|
+
}
|
|
32
|
+
return `${fallbackPx}px`;
|
|
33
|
+
}
|
|
34
|
+
function escapeHtmlAttribute(value) {
|
|
35
|
+
return value.replace(/&/g, '&').replace(/"/g, '"');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Inline CSS custom properties for banner WebView (subset of web `getThemeRootStyles`). */
|
|
39
|
+
export function bannerThemeInlineStyles(theme) {
|
|
40
|
+
const bannerBg = resolveBannerBackgroundColor(theme);
|
|
41
|
+
const bannerFg = resolveBannerForegroundColor(theme);
|
|
42
|
+
const fontSize = typeof theme.fontSize === 'number' ? theme.fontSize : 16;
|
|
43
|
+
const lineHeight = readNumber(theme, 'lineHeight', Math.round(fontSize * 1.5));
|
|
44
|
+
return {
|
|
45
|
+
'--userflow-banner-background-color': bannerBg,
|
|
46
|
+
'--userflow-banner-foreground-color': bannerFg,
|
|
47
|
+
'--userflow-banner-hover-background-color': readString(theme, 'bannerHoverBackgroundColor', bannerBg),
|
|
48
|
+
'--userflow-banner-active-background-color': readString(theme, 'bannerActiveBackgroundColor', bannerBg),
|
|
49
|
+
'--userflow-banner-hover-foreground-color': readString(theme, 'bannerHoverForegroundColor', bannerFg),
|
|
50
|
+
'--userflow-banner-active-foreground-color': readString(theme, 'bannerActiveForegroundColor', bannerFg),
|
|
51
|
+
'--userflow-font-family': readString(theme, 'fontFamily', 'system-ui, sans-serif'),
|
|
52
|
+
'--userflow-font-size': `${fontSize}px`,
|
|
53
|
+
'--userflow-line-height': `${lineHeight}px`,
|
|
54
|
+
'--userflow-button-height': readCssLength(theme, 'buttonHeight', 32),
|
|
55
|
+
'--userflow-button-border-radius': readCssLength(theme, 'buttonBorderRadius', 6),
|
|
56
|
+
'--userflow-button-min-width': readCssLength(theme, 'buttonMinWidth', 0),
|
|
57
|
+
'--userflow-main-foreground-color': bannerFg,
|
|
58
|
+
'--userflow-link-color': readString(theme, 'linkColor', bannerFg),
|
|
59
|
+
'--userflow-h1-font-size': `${Math.round(fontSize * 1.25)}px`,
|
|
60
|
+
'--userflow-h2-font-size': `${Math.round(fontSize * 1.125)}px`,
|
|
61
|
+
'--userflow-font-weight-normal': '400',
|
|
62
|
+
'--userflow-font-weight-bold': '600'
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export function bannerThemeStyleAttribute(theme) {
|
|
66
|
+
const entries = bannerThemeInlineStyles(theme);
|
|
67
|
+
return Object.entries(entries).map(([key, value]) => `${key}:${escapeHtmlAttribute(value)}`).join(';');
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=bannerThemeStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveBannerBackgroundColor","resolveBannerForegroundColor","readString","theme","key","fallback","value","trim","readNumber","Number","isFinite","parsed","parseFloat","readCssLength","fallbackPx","escapeHtmlAttribute","replace","bannerThemeInlineStyles","bannerBg","bannerFg","fontSize","lineHeight","Math","round","bannerThemeStyleAttribute","entries","Object","map","join"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/bannerThemeStyles.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Banner + bubble-button subset of web `bubble-frame.styl` for custom-banner WebViews.
|
|
5
|
+
* Custom theme CSS targets the same class names as userflow.js.
|
|
6
|
+
*/
|
|
7
|
+
export const BANNER_WEB_FRAME_CSS = `
|
|
8
|
+
.userflowjs-theme-root {
|
|
9
|
+
line-height: var(--userflow-line-height, 24px);
|
|
10
|
+
color: var(--userflow-main-foreground-color, inherit);
|
|
11
|
+
font-weight: var(--userflow-font-weight-normal, 400);
|
|
12
|
+
}
|
|
13
|
+
.userflowjs-theme-root, .userflowjs-theme-root button {
|
|
14
|
+
font-family: var(--userflow-font-family, system-ui, sans-serif);
|
|
15
|
+
font-size: var(--userflow-font-size, 16px);
|
|
16
|
+
}
|
|
17
|
+
.userflowjs-theme-root b, .userflowjs-theme-root strong {
|
|
18
|
+
font-weight: var(--userflow-font-weight-bold, 600);
|
|
19
|
+
}
|
|
20
|
+
.userflowjs-theme-root a {
|
|
21
|
+
color: var(--userflow-link-color, inherit);
|
|
22
|
+
text-decoration: underline;
|
|
23
|
+
}
|
|
24
|
+
.userflowjs-theme-root h1 {
|
|
25
|
+
font-size: var(--userflow-h1-font-size, 1.25em);
|
|
26
|
+
font-weight: var(--userflow-font-weight-bold, 600);
|
|
27
|
+
margin: 0 0 16px;
|
|
28
|
+
}
|
|
29
|
+
.userflowjs-theme-root h2 {
|
|
30
|
+
font-size: var(--userflow-h2-font-size, 1.125em);
|
|
31
|
+
font-weight: var(--userflow-font-weight-bold, 600);
|
|
32
|
+
margin: 0 0 16px;
|
|
33
|
+
}
|
|
34
|
+
.userflowjs-theme-root p {
|
|
35
|
+
margin: 0 0 16px;
|
|
36
|
+
}
|
|
37
|
+
.userflowjs-button-reset {
|
|
38
|
+
outline: 0;
|
|
39
|
+
border: 0;
|
|
40
|
+
padding: 0;
|
|
41
|
+
margin: 0;
|
|
42
|
+
background-color: transparent;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
.userflowjs-bubble-button-base {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
padding: calc((var(--userflow-button-height, 32px) - var(--userflow-line-height, 24px)) / 2) var(--userflow-font-size, 16px);
|
|
48
|
+
text-align: center;
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
text-overflow: ellipsis;
|
|
52
|
+
border-radius: 0.375em;
|
|
53
|
+
font-size: var(--userflow-font-size, 16px);
|
|
54
|
+
font-weight: var(--userflow-font-weight-bold, 600);
|
|
55
|
+
height: var(--userflow-button-height, 32px);
|
|
56
|
+
line-height: var(--userflow-line-height, 24px);
|
|
57
|
+
border: 0;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
.userflowjs-bubble-button {
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
}
|
|
64
|
+
.userflowjs-bubble-button--primary,
|
|
65
|
+
.userflowjs-bubble-button--default,
|
|
66
|
+
.userflowjs-bubble-button--banner-primary,
|
|
67
|
+
.userflowjs-bubble-button--banner-secondary {
|
|
68
|
+
font-family: var(--userflow-font-family, system-ui, sans-serif);
|
|
69
|
+
border-radius: var(--userflow-button-border-radius, 0.375em);
|
|
70
|
+
min-width: var(--userflow-button-min-width, 0);
|
|
71
|
+
white-space: normal;
|
|
72
|
+
max-width: 100%;
|
|
73
|
+
}
|
|
74
|
+
.userflowjs-bubble-button--banner-primary {
|
|
75
|
+
background-color: var(--userflow-banner-foreground-color);
|
|
76
|
+
color: var(--userflow-banner-background-color);
|
|
77
|
+
padding-left: 12px;
|
|
78
|
+
padding-right: 12px;
|
|
79
|
+
}
|
|
80
|
+
.userflowjs-bubble-button--banner-secondary {
|
|
81
|
+
background-color: var(--userflow-banner-background-color);
|
|
82
|
+
color: var(--userflow-banner-foreground-color);
|
|
83
|
+
border: 1px solid var(--userflow-banner-foreground-color);
|
|
84
|
+
padding-left: 12px;
|
|
85
|
+
padding-right: 12px;
|
|
86
|
+
}
|
|
87
|
+
.userflowjs-banner-root {
|
|
88
|
+
position: relative;
|
|
89
|
+
background: var(--userflow-banner-background-color);
|
|
90
|
+
color: var(--userflow-banner-foreground-color);
|
|
91
|
+
padding: 8px;
|
|
92
|
+
display: flex;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
align-items: center;
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
}
|
|
97
|
+
.userflowjs-banner-root--content-layout-START .userflowjs-banner-inner {
|
|
98
|
+
justify-content: flex-start;
|
|
99
|
+
}
|
|
100
|
+
.userflowjs-banner-root--content-layout-CENTER .userflowjs-banner-inner {
|
|
101
|
+
justify-content: center;
|
|
102
|
+
}
|
|
103
|
+
.userflowjs-banner-root--content-layout-SPACE_BETWEEN .userflowjs-banner-inner {
|
|
104
|
+
justify-content: space-between;
|
|
105
|
+
}
|
|
106
|
+
.userflowjs-banner-inner {
|
|
107
|
+
flex: 1 1 auto;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-wrap: wrap;
|
|
110
|
+
align-items: center;
|
|
111
|
+
column-gap: 16px;
|
|
112
|
+
row-gap: 8px;
|
|
113
|
+
margin: 0 8px;
|
|
114
|
+
min-width: 0;
|
|
115
|
+
}
|
|
116
|
+
.userflowjs-banner-content {
|
|
117
|
+
white-space: pre-wrap;
|
|
118
|
+
overflow-wrap: break-word;
|
|
119
|
+
flex-shrink: 1;
|
|
120
|
+
min-width: 0;
|
|
121
|
+
}
|
|
122
|
+
.userflowjs-banner-buttons {
|
|
123
|
+
display: flex;
|
|
124
|
+
gap: 8px;
|
|
125
|
+
flex-shrink: 0;
|
|
126
|
+
}
|
|
127
|
+
.userflowjs-banner-start-spacer {
|
|
128
|
+
flex: 1 1 0;
|
|
129
|
+
max-width: var(--userflow-button-height, 32px);
|
|
130
|
+
height: var(--userflow-button-height, 32px);
|
|
131
|
+
}
|
|
132
|
+
.userflowjs-banner-close {
|
|
133
|
+
flex-shrink: 0;
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
width: var(--userflow-button-height, 32px);
|
|
138
|
+
height: var(--userflow-button-height, 32px);
|
|
139
|
+
color: var(--userflow-banner-foreground-color);
|
|
140
|
+
background: transparent;
|
|
141
|
+
padding: 0;
|
|
142
|
+
border-radius: 4px;
|
|
143
|
+
}
|
|
144
|
+
.userflowjs-banner-close:hover {
|
|
145
|
+
background-color: var(--userflow-banner-hover-background-color, rgba(0,0,0,0.08));
|
|
146
|
+
}
|
|
147
|
+
`;
|
|
148
|
+
//# sourceMappingURL=bannerWebFrameCss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BANNER_WEB_FRAME_CSS"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/bannerWebFrameCss.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAO,MAAMA,oBAAoB,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { interpolateVariables } from '@userflow-tech/core';
|
|
4
|
+
import { BannerContentLayout } from '@userflow-tech/protocol';
|
|
5
|
+
import { buildBootstrapHtml, wrapCode } from "../../evalJs/bootstrap.js";
|
|
6
|
+
import { collectBannerAutoRunEvalCodes } from "./bannerAutoRunEvalJs.js";
|
|
7
|
+
import { bannerThemeStyleAttribute } from "./bannerThemeStyles.js";
|
|
8
|
+
import { BANNER_WEB_FRAME_CSS } from "./bannerWebFrameCss.js";
|
|
9
|
+
import { buttonClassName } from "./buttonClassName.js";
|
|
10
|
+
import { resolveCustomStylesheetUrl } from "./resolveCdnHost.js";
|
|
11
|
+
import { richContentDocToHtml } from "./richContentDocToHtml.js";
|
|
12
|
+
function contentLayoutClass(layout) {
|
|
13
|
+
switch (layout) {
|
|
14
|
+
case BannerContentLayout.CENTER:
|
|
15
|
+
return 'userflowjs-banner-root--content-layout-CENTER';
|
|
16
|
+
case BannerContentLayout.SPACE_BETWEEN:
|
|
17
|
+
return 'userflowjs-banner-root--content-layout-SPACE_BETWEEN';
|
|
18
|
+
case BannerContentLayout.START:
|
|
19
|
+
default:
|
|
20
|
+
return 'userflowjs-banner-root--content-layout-START';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function layoutMeasureScript() {
|
|
24
|
+
return `
|
|
25
|
+
(function(){
|
|
26
|
+
function postLayout(){
|
|
27
|
+
var root=document.querySelector('.userflowjs-banner-root');
|
|
28
|
+
if(!root||!window.ReactNativeWebView||!window.ReactNativeWebView.postMessage)return;
|
|
29
|
+
var rectH=root.getBoundingClientRect().height;
|
|
30
|
+
var scrollH=root.scrollHeight;
|
|
31
|
+
var h=Math.ceil(Math.max(scrollH,rectH));
|
|
32
|
+
var vh=window.innerHeight||0;
|
|
33
|
+
if(vh>0&&h>=vh-2){
|
|
34
|
+
var sum=0;
|
|
35
|
+
for(var i=0;i<root.childNodes.length;i++){
|
|
36
|
+
var node=root.childNodes[i];
|
|
37
|
+
if(node&&node.nodeType===1){
|
|
38
|
+
var el=node;
|
|
39
|
+
sum+=el.scrollHeight||el.offsetHeight||0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if(sum>0&&sum<h) h=Math.ceil(sum);
|
|
43
|
+
}
|
|
44
|
+
window.ReactNativeWebView.postMessage(JSON.stringify({__userflow:1,type:'bannerLayout',height:h}));
|
|
45
|
+
}
|
|
46
|
+
window.__userflowBannerLayout=postLayout;
|
|
47
|
+
if(typeof ResizeObserver!=='undefined'){
|
|
48
|
+
var root=document.querySelector('.userflowjs-banner-root');
|
|
49
|
+
if(root){new ResizeObserver(postLayout).observe(root);}
|
|
50
|
+
}
|
|
51
|
+
window.addEventListener('load',postLayout);
|
|
52
|
+
setTimeout(postLayout,0);
|
|
53
|
+
})();
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
function bannerInteractionScript() {
|
|
57
|
+
return `
|
|
58
|
+
(function(){
|
|
59
|
+
function post(msg){
|
|
60
|
+
if(window.ReactNativeWebView&&window.ReactNativeWebView.postMessage){
|
|
61
|
+
window.ReactNativeWebView.postMessage(JSON.stringify(Object.assign({__userflow:1},msg)));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
document.addEventListener('click',function(ev){
|
|
65
|
+
var t=ev.target;
|
|
66
|
+
if(!t||!t.closest)return;
|
|
67
|
+
var btn=t.closest('[data-userflow-banner-button]');
|
|
68
|
+
if(btn){
|
|
69
|
+
ev.preventDefault();
|
|
70
|
+
post({type:'bannerButton',buttonId:btn.getAttribute('data-userflow-banner-button')});
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
var close=t.closest('[data-userflow-banner-dismiss]');
|
|
74
|
+
if(close){
|
|
75
|
+
ev.preventDefault();
|
|
76
|
+
window.__userflowBannerEvalDismissed=true;
|
|
77
|
+
post({type:'bannerDismiss'});
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
})();
|
|
81
|
+
`;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Runs eval-only button scripts once the banner document (and `window.userflow`) exists. */
|
|
85
|
+
function bannerAutoRunEvalScript(banner, lookupAttribute) {
|
|
86
|
+
const codes = collectBannerAutoRunEvalCodes(banner, lookupAttribute);
|
|
87
|
+
if (codes.length === 0) {
|
|
88
|
+
return '';
|
|
89
|
+
}
|
|
90
|
+
const runs = codes.map(code => wrapCode(code)).join('');
|
|
91
|
+
return `
|
|
92
|
+
(function(){
|
|
93
|
+
if(window.__userflowBannerEvalDismissed||window.__userflowBannerEvalRan)return;
|
|
94
|
+
window.__userflowBannerEvalRan=true;
|
|
95
|
+
function run(){
|
|
96
|
+
if(window.__userflowBannerEvalDismissed)return;
|
|
97
|
+
${runs}
|
|
98
|
+
}
|
|
99
|
+
if(document.readyState==='loading'){
|
|
100
|
+
document.addEventListener('DOMContentLoaded',run,{once:true});
|
|
101
|
+
}else{
|
|
102
|
+
run();
|
|
103
|
+
}
|
|
104
|
+
})();
|
|
105
|
+
`;
|
|
106
|
+
}
|
|
107
|
+
export function buildCustomBannerBodyHtml(session, lookupAttribute, serverEndpoint, options) {
|
|
108
|
+
const banner = session.version.banner;
|
|
109
|
+
const theme = session.version.theme;
|
|
110
|
+
const layoutClass = contentLayoutClass(banner.contentLayout);
|
|
111
|
+
const themeStyle = bannerThemeStyleAttribute(theme);
|
|
112
|
+
const customCssUrl = resolveCustomStylesheetUrl(serverEndpoint, theme);
|
|
113
|
+
const maxInner = banner.maxContentWidth != null ? ` style="max-width:${banner.maxContentWidth}px"` : '';
|
|
114
|
+
const contentHtml = richContentDocToHtml(banner.content, lookupAttribute);
|
|
115
|
+
const buttonsHtml = banner.buttons.map(button => {
|
|
116
|
+
const label = escapeAttr(interpolateVariables(button.text, lookupAttribute));
|
|
117
|
+
const classes = escapeAttr(buttonClassName(button.appearance));
|
|
118
|
+
return `<button type="button" class="${classes}" data-userflow-banner-button="${escapeAttr(button.id)}"><span class="userflowjs-bubble-button-text">${label}</span></button>`;
|
|
119
|
+
}).join('');
|
|
120
|
+
const closeHtml = session.version.closeDisabled ? '<div class="userflowjs-banner-start-spacer"></div>' : '<button type="button" class="userflowjs-banner-close userflowjs-button-reset" data-userflow-banner-dismiss="1" aria-label="Dismiss">×</button>';
|
|
121
|
+
const customLink = customCssUrl ? `<link rel="stylesheet" href="${escapeAttr(customCssUrl)}" />` : '';
|
|
122
|
+
return `
|
|
123
|
+
<style>${BANNER_WEB_FRAME_CSS}</style>
|
|
124
|
+
${customLink}
|
|
125
|
+
<div class="userflowjs-banner-root userflowjs-theme-root ${layoutClass}" style="${themeStyle}">
|
|
126
|
+
<div class="userflowjs-banner-start-spacer"></div>
|
|
127
|
+
<div class="userflowjs-banner-inner"${maxInner}>
|
|
128
|
+
<div class="userflowjs-banner-content">${contentHtml}</div>
|
|
129
|
+
${buttonsHtml ? `<div class="userflowjs-banner-buttons">${buttonsHtml}</div>` : ''}
|
|
130
|
+
</div>
|
|
131
|
+
${closeHtml}
|
|
132
|
+
</div>
|
|
133
|
+
<script>${layoutMeasureScript()}${bannerInteractionScript()}${options?.skipAutoRunEval ? '' : bannerAutoRunEvalScript(banner, lookupAttribute)}</script>
|
|
134
|
+
`;
|
|
135
|
+
}
|
|
136
|
+
export function buildCustomBannerHtml(context, session, lookupAttribute, serverEndpoint, options) {
|
|
137
|
+
const body = buildCustomBannerBodyHtml(session, lookupAttribute, serverEndpoint, options);
|
|
138
|
+
return buildBootstrapHtml(context, body);
|
|
139
|
+
}
|
|
140
|
+
function escapeAttr(value) {
|
|
141
|
+
return value.replace(/&/g, '&').replace(/"/g, '"').replace(/</g, '<');
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=buildCustomBannerHtml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["interpolateVariables","BannerContentLayout","buildBootstrapHtml","wrapCode","collectBannerAutoRunEvalCodes","bannerThemeStyleAttribute","BANNER_WEB_FRAME_CSS","buttonClassName","resolveCustomStylesheetUrl","richContentDocToHtml","contentLayoutClass","layout","CENTER","SPACE_BETWEEN","START","layoutMeasureScript","bannerInteractionScript","bannerAutoRunEvalScript","banner","lookupAttribute","codes","length","runs","map","code","join","buildCustomBannerBodyHtml","session","serverEndpoint","options","version","theme","layoutClass","contentLayout","themeStyle","customCssUrl","maxInner","maxContentWidth","contentHtml","content","buttonsHtml","buttons","button","label","escapeAttr","text","classes","appearance","id","closeHtml","closeDisabled","customLink","skipAutoRunEval","buildCustomBannerHtml","context","body","value","replace"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/buildCustomBannerHtml.ts"],"mappings":"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","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":"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","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Animated } from 'react-native';
|
|
5
|
+
|
|
6
|
+
/** Outgoing card leaves fast; the incoming one gets web's `opacity 250ms` feel. */
|
|
7
|
+
export const CARD_EXIT_MS = 120;
|
|
8
|
+
export const CARD_ENTER_MS = 200;
|
|
9
|
+
const CardTransitionContext = /*#__PURE__*/React.createContext(null);
|
|
10
|
+
export const CardTransitionProvider = CardTransitionContext.Provider;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Phase of the surrounding step transition, or `null` outside one.
|
|
14
|
+
*
|
|
15
|
+
* Surfaces use this to hold side effects while they fade out: an exiting card is
|
|
16
|
+
* still mounted for `CARD_EXIT_MS`, and anything it measures or arms in that
|
|
17
|
+
* window belongs to a step the user has already left.
|
|
18
|
+
*/
|
|
19
|
+
export function useCardTransitionPhase() {
|
|
20
|
+
return React.useContext(CardTransitionContext);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Fade for a surface's card chrome, so step swaps move the card alone and leave
|
|
25
|
+
* the backdrop and cutout steady (same as web, where `FlowChrome` animates the
|
|
26
|
+
* bubble alone).
|
|
27
|
+
*
|
|
28
|
+
* Each card owns its value and starts the fade from its own mount rather than
|
|
29
|
+
* sharing one animation across the swap. Cards can appear well after the step
|
|
30
|
+
* changes — `TooltipSurface` renders nothing until its anchor measures — and a
|
|
31
|
+
* shared animation would already have finished by then, leaving the card at the
|
|
32
|
+
* stale JS value of 0 forever, since native-driven animations never write back
|
|
33
|
+
* to JS.
|
|
34
|
+
*
|
|
35
|
+
* Returns `null` outside a flow transition (unit tests), leaving opacity alone.
|
|
36
|
+
*/
|
|
37
|
+
export function useCardOpacity() {
|
|
38
|
+
const phase = React.useContext(CardTransitionContext);
|
|
39
|
+
const opacityRef = React.useRef(null);
|
|
40
|
+
if (phase != null && opacityRef.current == null) {
|
|
41
|
+
opacityRef.current = new Animated.Value(phase === 'exiting' ? 1 : 0);
|
|
42
|
+
}
|
|
43
|
+
const opacity = opacityRef.current;
|
|
44
|
+
React.useLayoutEffect(() => {
|
|
45
|
+
if (phase == null || opacity == null) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const exiting = phase === 'exiting';
|
|
49
|
+
// Pin the start point: a native-driven ramp is computed from the JS value,
|
|
50
|
+
// which the previous native animation left behind.
|
|
51
|
+
opacity.setValue(exiting ? 1 : 0);
|
|
52
|
+
const animation = Animated.timing(opacity, {
|
|
53
|
+
toValue: exiting ? 0 : 1,
|
|
54
|
+
duration: exiting ? CARD_EXIT_MS : CARD_ENTER_MS,
|
|
55
|
+
useNativeDriver: true
|
|
56
|
+
});
|
|
57
|
+
animation.start();
|
|
58
|
+
return () => {
|
|
59
|
+
animation.stop();
|
|
60
|
+
};
|
|
61
|
+
}, [opacity, phase]);
|
|
62
|
+
return opacity;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=cardTransition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Animated","CARD_EXIT_MS","CARD_ENTER_MS","CardTransitionContext","createContext","CardTransitionProvider","Provider","useCardTransitionPhase","useContext","useCardOpacity","phase","opacityRef","useRef","current","Value","opacity","useLayoutEffect","exiting","setValue","animation","timing","toValue","duration","useNativeDriver","start","stop"],"sourceRoot":"../../../src","sources":["surfaces/cardTransition.ts"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,cAAc;;AAEvC;AACA,OAAO,MAAMC,YAAY,GAAG,GAAG;AAC/B,OAAO,MAAMC,aAAa,GAAG,GAAG;AAIhC,MAAMC,qBAAqB,gBAAGJ,KAAK,CAACK,aAAa,CAA6B,IAAI,CAAC;AAEnF,OAAO,MAAMC,sBAAsB,GAAGF,qBAAqB,CAACG,QAAQ;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAA,EAA+B;EACnE,OAAOR,KAAK,CAACS,UAAU,CAACL,qBAAqB,CAAC;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,cAAcA,CAAA,EAA0B;EACtD,MAAMC,KAAK,GAAGX,KAAK,CAACS,UAAU,CAACL,qBAAqB,CAAC;EACrD,MAAMQ,UAAU,GAAGZ,KAAK,CAACa,MAAM,CAAwB,IAAI,CAAC;EAC5D,IAAIF,KAAK,IAAI,IAAI,IAAIC,UAAU,CAACE,OAAO,IAAI,IAAI,EAAE;IAC/CF,UAAU,CAACE,OAAO,GAAG,IAAIb,QAAQ,CAACc,KAAK,CAACJ,KAAK,KAAK,SAAS,GAAG,CAAC,GAAG,CAAC,CAAC;EACtE;EACA,MAAMK,OAAO,GAAGJ,UAAU,CAACE,OAAO;EAElCd,KAAK,CAACiB,eAAe,CAAC,MAAM;IAC1B,IAAIN,KAAK,IAAI,IAAI,IAAIK,OAAO,IAAI,IAAI,EAAE;MACpC;IACF;IACA,MAAME,OAAO,GAAGP,KAAK,KAAK,SAAS;IACnC;IACA;IACAK,OAAO,CAACG,QAAQ,CAACD,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,MAAME,SAAS,GAAGnB,QAAQ,CAACoB,MAAM,CAACL,OAAO,EAAE;MACzCM,OAAO,EAAEJ,OAAO,GAAG,CAAC,GAAG,CAAC;MACxBK,QAAQ,EAAEL,OAAO,GAAGhB,YAAY,GAAGC,aAAa;MAChDqB,eAAe,EAAE;IACnB,CAAC,CAAC;IACFJ,SAAS,CAACK,KAAK,CAAC,CAAC;IACjB,OAAO,MAAM;MACXL,SAAS,CAACM,IAAI,CAAC,CAAC;IAClB,CAAC;EACH,CAAC,EAAE,CAACV,OAAO,EAAEL,KAAK,CAAC,CAAC;EAEpB,OAAOK,OAAO;AAChB","ignoreList":[]}
|