@userflow-tech/react-native 0.1.1 → 0.2.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 +97 -61
- package/app.plugin.js +11 -1
- package/babel-plugin/index.d.ts +8 -8
- package/babel-plugin/index.d.ts.map +1 -1
- package/babel-plugin/index.js +17 -9
- package/babel-plugin/index.js.map +1 -1
- package/babel-plugin.js +13 -0
- package/docs/anchoring.md +141 -13
- package/docs/deep-linking.md +18 -15
- package/docs/theme-mapping.md +44 -15
- package/docs/troubleshooting.md +36 -29
- package/expo-plugin/withUserflow.js +1 -1
- package/expo-plugin/withUserflow.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +124 -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/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/fiberAnchorCache.js +50 -0
- package/lib/commonjs/anchors/fiberAnchorCache.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 +171 -0
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/commonjs/anchors/semanticMatcher.js +285 -0
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
- package/lib/commonjs/authoring/ElementPickerOverlay.js +490 -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 +64 -0
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeButton.js +94 -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 +39 -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 +110 -0
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +57 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +80 -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/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 +150 -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 +195 -0
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/commonjs/authoring/hitTest.js +106 -0
- package/lib/commonjs/authoring/hitTest.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/resolveStepButtonChrome.js +8 -6
- package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/commonjs/content/themeColor.js +11 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deviceContext.js +158 -0
- package/lib/commonjs/deviceContext.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +40 -4
- 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 +118 -5
- 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 +17 -8
- 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/pairing/PairingController.js +29 -2
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +211 -84
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/commonjs/pairing/diagnostics.js +9 -0
- 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 +25 -2
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +3 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/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/TargetPressBridge.js +13 -44
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowProvider.js +74 -20
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
- package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +3 -1
- 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/useFlowSessionState.js +2 -1
- package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
- package/lib/commonjs/screenTracker.js +46 -4
- package/lib/commonjs/screenTracker.js.map +1 -1
- 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/ModalSurface.js +50 -34
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +366 -87
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/cardTransition.js +70 -0
- package/lib/commonjs/surfaces/cardTransition.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/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 +125 -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/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/fiberAnchorCache.js +40 -0
- package/lib/module/anchors/fiberAnchorCache.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 +167 -0
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/module/anchors/semanticMatcher.js +280 -0
- package/lib/module/anchors/semanticMatcher.js.map +1 -0
- package/lib/module/authoring/ElementPickerOverlay.js +485 -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 +59 -0
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeButton.js +89 -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 +33 -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 +104 -0
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js +52 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js +75 -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/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 +146 -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 +187 -0
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/module/authoring/hitTest.js +100 -0
- package/lib/module/authoring/hitTest.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/resolveStepButtonChrome.js +8 -6
- package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/module/content/themeColor.js +10 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deviceContext.js +142 -0
- package/lib/module/deviceContext.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +42 -6
- 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 +119 -6
- 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 +18 -9
- 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/pairing/PairingController.js +30 -3
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +212 -85
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/module/pairing/diagnostics.js +8 -0
- 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 +24 -2
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +3 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/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/TargetPressBridge.js +12 -43
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowProvider.js +74 -20
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/changedTouchPoints.js +43 -0
- package/lib/module/runtime/changedTouchPoints.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +3 -1
- 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/useFlowSessionState.js +2 -1
- package/lib/module/runtime/useFlowSessionState.js.map +1 -1
- package/lib/module/screenTracker.js +42 -4
- package/lib/module/screenTracker.js.map +1 -1
- 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/ModalSurface.js +52 -36
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +368 -90
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/cardTransition.js +64 -0
- package/lib/module/surfaces/cardTransition.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/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 +26 -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/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/fiberAnchorCache.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.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 +48 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +7 -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 +13 -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 +25 -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 +26 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +141 -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 +59 -0
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +26 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +31 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.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/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +5 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
- 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/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 +53 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts +6 -0
- 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/pairing/PairingController.d.ts +7 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +6 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +5 -0
- 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 +2 -0
- 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/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/TargetPressBridge.d.ts +5 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +6 -4
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- 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/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/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 +21 -3
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- 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 +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/cardTransition.d.ts +31 -0
- package/lib/typescript/commonjs/src/surfaces/cardTransition.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/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 +26 -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/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/fiberAnchorCache.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiberAnchorCache.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 +48 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +7 -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 +13 -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 +25 -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 +26 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +141 -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 +59 -0
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +26 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts +31 -0
- package/lib/typescript/module/src/authoring/hitTest.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/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/module/src/content/themeColor.d.ts +5 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
- 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/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 +53 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/lifecycle.d.ts +6 -0
- 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/pairing/PairingController.d.ts +7 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +6 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +5 -0
- 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 +2 -0
- 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/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/TargetPressBridge.d.ts +5 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +6 -4
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- 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/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/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 +21 -3
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- 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 +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/cardTransition.d.ts +31 -0
- package/lib/typescript/module/src/surfaces/cardTransition.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/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 +22 -16
- package/src/anchors/AutoAnchorRegistry.ts +139 -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/indexHostFibers.ts +136 -0
- package/src/anchors/fiber/readHostContent.ts +146 -0
- package/src/anchors/fiberAnchorCache.ts +45 -0
- package/src/anchors/resolveAnchorHost.ts +23 -23
- package/src/anchors/resolveAutoAnchorHost.ts +180 -0
- package/src/anchors/semanticMatcher.ts +361 -0
- package/src/authoring/ElementPickerOverlay.tsx +553 -0
- package/src/authoring/capturePickerScreenshot.ts +90 -0
- package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
- package/src/authoring/chrome/ChromeBottomSheet.tsx +69 -0
- package/src/authoring/chrome/ChromeButton.tsx +103 -0
- package/src/authoring/chrome/ChromeDialog.tsx +121 -0
- package/src/authoring/chrome/ChromeIcon.tsx +40 -0
- package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
- package/src/authoring/chrome/ChromeTopBar.tsx +126 -0
- package/src/authoring/chrome/DoubleTapBridge.tsx +60 -0
- package/src/authoring/chrome/doubleTapMonitor.ts +80 -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/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 +106 -0
- package/src/authoring/doubleTap.ts +27 -0
- package/src/authoring/elementPickerController.ts +135 -0
- package/src/authoring/fingerprintFromInstance.ts +152 -0
- package/src/authoring/hitTest.ts +133 -0
- package/src/content/RichContentRenderer.tsx +22 -1
- package/src/content/StepButton.tsx +17 -2
- package/src/content/resolveStepButtonChrome.ts +12 -6
- package/src/content/themeColor.ts +10 -0
- package/src/deviceContext.ts +168 -0
- package/src/expo-router/useUserflowExpoRouter.ts +47 -4
- package/src/hostAppVersion.ts +258 -0
- package/src/index.ts +148 -4
- package/src/lifecycle.ts +8 -0
- package/src/navigation/WithUserflowReactNavigation.tsx +23 -7
- package/src/navigation/isOverlayPresentation.ts +76 -0
- package/src/pairing/PairingController.ts +32 -3
- package/src/pairing/PreviewModeBanner.tsx +250 -94
- package/src/pairing/diagnostics.ts +8 -0
- package/src/pairing/elementPickerRelay.ts +100 -0
- package/src/pairing/resolvePreviewChrome.ts +57 -0
- package/src/pairing/tokenStorage.ts +31 -2
- package/src/pairing/usePairingState.ts +2 -0
- package/src/runtime/FlowRenderer.tsx +55 -27
- package/src/runtime/FlowSurfaceFade.tsx +51 -30
- package/src/runtime/TargetPressBridge.tsx +14 -32
- package/src/runtime/UserflowProvider.tsx +76 -13
- package/src/runtime/changedTouchPoints.ts +34 -0
- package/src/runtime/flowEngine.ts +2 -0
- package/src/runtime/flowSessionViewState.ts +42 -4
- package/src/runtime/useFlowSessionState.ts +2 -0
- package/src/screenTracker.ts +46 -4
- package/src/surfaces/CardFade.tsx +18 -0
- package/src/surfaces/CloseButton.tsx +17 -7
- package/src/surfaces/MadeWithUserflow.tsx +1 -1
- package/src/surfaces/ModalSurface.tsx +48 -35
- package/src/surfaces/TooltipSurface.tsx +406 -86
- package/src/surfaces/cardTransition.ts +67 -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/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.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +69 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.js +268 -7
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +44 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +103 -9
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +23 -4
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +64 -1
- 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 +27 -4
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +140 -13
- 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 +25 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackCondition.js +177 -0
- package/vendor/core/dist/engine/trackCondition.js.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +21 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.js +49 -0
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
- package/vendor/core/dist/index.d.ts +4 -3
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +2 -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 +127 -0
- package/vendor/core/dist/normalizeAttributes.js.map +1 -0
- package/vendor/core/dist/transport/phoenix.d.ts +11 -6
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +59 -5
- 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 +2 -2
- package/vendor/protocol/dist/autoData.js +2 -2
- 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 +66 -4
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.js +50 -3
- 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 +25 -4
- package/vendor/protocol/dist/messages.d.ts.map +1 -1
- package/vendor/protocol/dist/messages.js +4 -0
- 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,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** React Navigation `options.presentation` values that are overlays, not screens. */
|
|
4
|
+
const OVERLAY_PRESENTATIONS = new Set(['modal', 'transparentModal', 'containedModal', 'containedTransparentModal', 'fullScreenModal', 'formSheet', 'pageSheet']);
|
|
5
|
+
|
|
6
|
+
/** True when the focused route is a modal / sheet overlay, not a screen navigation. */
|
|
7
|
+
export function isOverlayPresentation(presentation) {
|
|
8
|
+
return typeof presentation === 'string' && OVERLAY_PRESENTATIONS.has(presentation);
|
|
9
|
+
}
|
|
10
|
+
function presentationFromHolder(holder) {
|
|
11
|
+
if (holder == null || typeof holder !== 'object') return undefined;
|
|
12
|
+
const getCurrentOptions = holder.getCurrentOptions;
|
|
13
|
+
if (typeof getCurrentOptions !== 'function') return undefined;
|
|
14
|
+
try {
|
|
15
|
+
return getCurrentOptions()?.presentation;
|
|
16
|
+
} catch {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Reads `presentation` from a React Navigation container ref.
|
|
23
|
+
* Accepts either a `NavigationContainerRef` or a `NavigationContainerRefWithCurrent`
|
|
24
|
+
* (`ref.current` is checked when the wrapper itself has no `getCurrentOptions`).
|
|
25
|
+
*/
|
|
26
|
+
export function readNavigationPresentation(ref) {
|
|
27
|
+
const fromRef = presentationFromHolder(ref);
|
|
28
|
+
if (fromRef !== undefined) return fromRef;
|
|
29
|
+
if (ref != null && typeof ref === 'object' && 'current' in ref) {
|
|
30
|
+
return presentationFromHolder(ref.current);
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
function subscribeHolder(holder, listener) {
|
|
35
|
+
if (holder == null || typeof holder !== 'object') return undefined;
|
|
36
|
+
const addListener = holder.addListener;
|
|
37
|
+
if (typeof addListener !== 'function') return undefined;
|
|
38
|
+
try {
|
|
39
|
+
const unsubscribe = addListener.call(holder, 'state', listener);
|
|
40
|
+
return typeof unsubscribe === 'function' ? unsubscribe : undefined;
|
|
41
|
+
} catch {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Subscribes to React Navigation container `state` events.
|
|
48
|
+
* Accepts a `NavigationContainerRef` or `NavigationContainerRefWithCurrent`.
|
|
49
|
+
*/
|
|
50
|
+
export function subscribeNavigationState(ref, listener) {
|
|
51
|
+
const fromRef = subscribeHolder(ref, listener);
|
|
52
|
+
if (fromRef) return fromRef;
|
|
53
|
+
if (ref != null && typeof ref === 'object' && 'current' in ref) {
|
|
54
|
+
return subscribeHolder(ref.current, listener);
|
|
55
|
+
}
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=isOverlayPresentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["OVERLAY_PRESENTATIONS","Set","isOverlayPresentation","presentation","has","presentationFromHolder","holder","undefined","getCurrentOptions","readNavigationPresentation","ref","fromRef","current","subscribeHolder","listener","addListener","unsubscribe","call","subscribeNavigationState"],"sourceRoot":"../../../src","sources":["navigation/isOverlayPresentation.ts"],"mappings":";;AAAA;AACA,MAAMA,qBAAqB,GAAG,IAAIC,GAAG,CAAC,CACpC,OAAO,EACP,kBAAkB,EAClB,gBAAgB,EAChB,2BAA2B,EAC3B,iBAAiB,EACjB,WAAW,EACX,WAAW,CACZ,CAAC;;AAEF;AACA,OAAO,SAASC,qBAAqBA,CAACC,YAAqB,EAAW;EACpE,OAAO,OAAOA,YAAY,KAAK,QAAQ,IAAIH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;AACA;AACA,OAAO,SAASW,wBAAwBA,CACtCR,GAAY,EACZI,QAAoB,EACM;EAC1B,MAAMH,OAAO,GAAGE,eAAe,CAACH,GAAG,EAAEI,QAAQ,CAAC;EAC9C,IAAIH,OAAO,EAAE,OAAOA,OAAO;EAC3B,IAAID,GAAG,IAAI,IAAI,IAAI,OAAOA,GAAG,KAAK,QAAQ,IAAI,SAAS,IAAIA,GAAG,EAAE;IAC9D,OAAOG,eAAe,CAAEH,GAAG,CAA0BE,OAAO,EAAEE,QAAQ,CAAC;EACzE;EACA,OAAOP,SAAS;AAClB","ignoreList":[]}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { DEFAULT_PAIRING_ENDPOINT, PairingEngine } from '@userflow-tech/core';
|
|
4
4
|
import { AppState, Linking, Platform } from 'react-native';
|
|
5
|
+
import { clearFiberAnchorCache } from "../anchors/fiberAnchorCache.js";
|
|
5
6
|
import { inspectPairingDeepLink, isPairingAttempt } from "./deepLink.js";
|
|
6
|
-
import { defaultPairingLogger, pairingAttemptRejectionMessage, pairingConnectFailedMessage, pairingLinkDeferredMessage, pairingLinkInitFailedMessage, pairingListenerSetupFailedMessage, pairingTokenStoreClearFailedMessage } from "./diagnostics.js";
|
|
7
|
+
import { defaultPairingLogger, pairingAttemptRejectionMessage, pairingConnectFailedMessage, pairingLinkDeferredMessage, pairingLinkInitFailedMessage, pairingListenerSetupFailedMessage, pairingPreviewErrorMessage, pairingTokenStoreClearFailedMessage } from "./diagnostics.js";
|
|
8
|
+
import { bindElementPickerRelay } from "./elementPickerRelay.js";
|
|
7
9
|
import { createPairingTokenStore } from "./tokenStorage.js";
|
|
8
10
|
|
|
9
11
|
/**
|
|
@@ -32,6 +34,7 @@ export class PairingController {
|
|
|
32
34
|
deferredPairingToken = null;
|
|
33
35
|
/** Diagnostics already emitted for the current init attempt. */
|
|
34
36
|
loggedOnce = new Set();
|
|
37
|
+
relayUnsub = null;
|
|
35
38
|
constructor(options) {
|
|
36
39
|
this.core = options.core;
|
|
37
40
|
this.pairingEndpoint = options.pairingEndpoint ?? DEFAULT_PAIRING_ENDPOINT;
|
|
@@ -59,7 +62,9 @@ export class PairingController {
|
|
|
59
62
|
previewActive: false,
|
|
60
63
|
lastError: null,
|
|
61
64
|
needsRescan: false,
|
|
62
|
-
awaitingStartCondition: false
|
|
65
|
+
awaitingStartCondition: false,
|
|
66
|
+
canRestartPreview: false,
|
|
67
|
+
previewRestartGeneration: 0
|
|
63
68
|
};
|
|
64
69
|
}
|
|
65
70
|
|
|
@@ -76,7 +81,9 @@ export class PairingController {
|
|
|
76
81
|
previewActive: false,
|
|
77
82
|
lastError: `Userflow.init() failed, so preview could not start: ${this.initFailureReason ?? 'unknown error'}`,
|
|
78
83
|
needsRescan: true,
|
|
79
|
-
awaitingStartCondition: false
|
|
84
|
+
awaitingStartCondition: false,
|
|
85
|
+
canRestartPreview: false,
|
|
86
|
+
previewRestartGeneration: 0
|
|
80
87
|
};
|
|
81
88
|
}
|
|
82
89
|
onStateChange(listener) {
|
|
@@ -138,6 +145,7 @@ export class PairingController {
|
|
|
138
145
|
this.appStateSub?.remove();
|
|
139
146
|
this.appStateSub = null;
|
|
140
147
|
this.started = false;
|
|
148
|
+
this.unbindRelay();
|
|
141
149
|
void this.exitPreview();
|
|
142
150
|
}
|
|
143
151
|
|
|
@@ -243,6 +251,16 @@ export class PairingController {
|
|
|
243
251
|
this.emit(this.getState());
|
|
244
252
|
}
|
|
245
253
|
|
|
254
|
+
/**
|
|
255
|
+
* Replay the last previewed flow from step 1. No-ops when nothing has been
|
|
256
|
+
* delivered yet (restart control is hidden in that case).
|
|
257
|
+
*/
|
|
258
|
+
async restartPreview() {
|
|
259
|
+
if (!this.engine) return false;
|
|
260
|
+
clearFiberAnchorCache();
|
|
261
|
+
return this.engine.restartPreview();
|
|
262
|
+
}
|
|
263
|
+
|
|
246
264
|
/** Flush queued startFlowWithToken after identify. */
|
|
247
265
|
notifyIdentified() {
|
|
248
266
|
this.engine?.notifyIdentified();
|
|
@@ -262,12 +280,21 @@ export class PairingController {
|
|
|
262
280
|
});
|
|
263
281
|
this.engine.onStateChange(state => {
|
|
264
282
|
this.emit(state);
|
|
283
|
+
if (state.lastError) {
|
|
284
|
+
this.warnOnce(pairingPreviewErrorMessage(state.lastError));
|
|
285
|
+
}
|
|
265
286
|
if (state.status === 'token_expired' || state.needsRescan) {
|
|
266
287
|
void this.tokenStore.clear();
|
|
267
288
|
}
|
|
268
289
|
});
|
|
290
|
+
this.unbindRelay();
|
|
291
|
+
this.relayUnsub = bindElementPickerRelay(this.engine);
|
|
269
292
|
return this.engine;
|
|
270
293
|
}
|
|
294
|
+
unbindRelay() {
|
|
295
|
+
this.relayUnsub?.();
|
|
296
|
+
this.relayUnsub = null;
|
|
297
|
+
}
|
|
271
298
|
emit(state) {
|
|
272
299
|
for (const listener of this.listeners) {
|
|
273
300
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_PAIRING_ENDPOINT","PairingEngine","AppState","Linking","Platform","inspectPairingDeepLink","isPairingAttempt","defaultPairingLogger","pairingAttemptRejectionMessage","pairingConnectFailedMessage","pairingLinkDeferredMessage","pairingLinkInitFailedMessage","pairingListenerSetupFailedMessage","pairingTokenStoreClearFailedMessage","createPairingTokenStore","PairingController","engine","started","urlSub","appStateSub","listeners","Set","initPhase","initFailureReason","deferredPairingToken","loggedOnce","constructor","options","core","pairingEndpoint","tokenStore","LinkingModule","AppStateModule","clearLocalSession","undefined","logger","getEngine","hasStarted","getState","blocked","blockedState","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","onStateChange","listener","add","delete","start","startListening","error","warnOnce","describeError","clear","ensureEngine","addEventListener","url","handleUrl","catch","next","ensureAlive","initial","getInitialURL","stop","remove","exitPreview","inspected","ok","reason","link","pairingToken","emit","enterPreview","notifyInitStarted","wasBlocked","notifyInitialized","deferred","notifyInitFailed","message","has","set","notifyIdentified","sendClientMessage","send","onServerMessage","handler","isIdentified","getUserId","pairingOptions","deviceMeta","os","OS","state","Error","String"],"sourceRoot":"../../../src","sources":["pairing/PairingController.ts"],"mappings":";;AAAA,SACEA,wBAAwB,EACxBC,aAAa,QAGR,qBAAqB;AAC5B,SAASC,QAAQ,EAAuBC,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAE/E,SAASC,sBAAsB,EAAEC,gBAAgB,QAAQ,eAAY;AACrE,SACEC,oBAAoB,EACpBC,8BAA8B,EAC9BC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,iCAAiC,EACjCC,mCAAmC,QAE9B,kBAAe;AACtB,SAASC,uBAAuB,QAAgC,mBAAgB;;AAIhF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,CAAC;EACrBC,MAAM,GAAyB,IAAI;EACnCC,OAAO,GAAG,KAAK;EACfC,MAAM,GAA8B,IAAI;EACxCC,WAAW,GAA8B,IAAI;EACpCC,SAAS,GAAG,IAAIC,GAAG,CAA4B,CAAC;EAQzDC,SAAS,GAAc,OAAO;EAC9BC,iBAAiB,GAAkB,IAAI;EAC/C;EACQC,oBAAoB,GAAkB,IAAI;EAClD;EACiBC,UAAU,GAAG,IAAIJ,GAAG,CAAS,CAAC;
|
|
1
|
+
{"version":3,"names":["DEFAULT_PAIRING_ENDPOINT","PairingEngine","AppState","Linking","Platform","clearFiberAnchorCache","inspectPairingDeepLink","isPairingAttempt","defaultPairingLogger","pairingAttemptRejectionMessage","pairingConnectFailedMessage","pairingLinkDeferredMessage","pairingLinkInitFailedMessage","pairingListenerSetupFailedMessage","pairingPreviewErrorMessage","pairingTokenStoreClearFailedMessage","bindElementPickerRelay","createPairingTokenStore","PairingController","engine","started","urlSub","appStateSub","listeners","Set","initPhase","initFailureReason","deferredPairingToken","loggedOnce","relayUnsub","constructor","options","core","pairingEndpoint","tokenStore","LinkingModule","AppStateModule","clearLocalSession","undefined","logger","getEngine","hasStarted","getState","blocked","blockedState","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","canRestartPreview","previewRestartGeneration","onStateChange","listener","add","delete","start","startListening","error","warnOnce","describeError","clear","ensureEngine","addEventListener","url","handleUrl","catch","next","ensureAlive","initial","getInitialURL","stop","remove","unbindRelay","exitPreview","inspected","ok","reason","link","pairingToken","emit","enterPreview","notifyInitStarted","wasBlocked","notifyInitialized","deferred","notifyInitFailed","message","has","set","restartPreview","notifyIdentified","sendClientMessage","send","onServerMessage","handler","isIdentified","getUserId","pairingOptions","deviceMeta","os","OS","state","Error","String"],"sourceRoot":"../../../src","sources":["pairing/PairingController.ts"],"mappings":";;AAAA,SACEA,wBAAwB,EACxBC,aAAa,QAGR,qBAAqB;AAC5B,SAASC,QAAQ,EAAuBC,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAE/E,SAASC,qBAAqB,QAAQ,gCAA6B;AAEnE,SAASC,sBAAsB,EAAEC,gBAAgB,QAAQ,eAAY;AACrE,SACEC,oBAAoB,EACpBC,8BAA8B,EAC9BC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,iCAAiC,EACjCC,0BAA0B,EAC1BC,mCAAmC,QAE9B,kBAAe;AACtB,SAASC,sBAAsB,QAAQ,yBAAsB;AAC7D,SAASC,uBAAuB,QAAgC,mBAAgB;;AAIhF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,CAAC;EACrBC,MAAM,GAAyB,IAAI;EACnCC,OAAO,GAAG,KAAK;EACfC,MAAM,GAA8B,IAAI;EACxCC,WAAW,GAA8B,IAAI;EACpCC,SAAS,GAAG,IAAIC,GAAG,CAA4B,CAAC;EAQzDC,SAAS,GAAc,OAAO;EAC9BC,iBAAiB,GAAkB,IAAI;EAC/C;EACQC,oBAAoB,GAAkB,IAAI;EAClD;EACiBC,UAAU,GAAG,IAAI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CAAC;MAC5D;MACA,IAAIuD,KAAK,CAAC3D,MAAM,KAAK,eAAe,IAAI2D,KAAK,CAACtD,WAAW,EAAE;QACzD,KAAK,IAAI,CAAChB,UAAU,CAAC6B,KAAK,CAAC,CAAC;MAC9B;IACF,CAAC,CAAC;IAEF,IAAI,CAACY,WAAW,CAAC,CAAC;IAClB,IAAI,CAAC9C,UAAU,GAAGb,sBAAsB,CAAC,IAAI,CAACG,MAAM,CAAC;IAErD,OAAO,IAAI,CAACA,MAAM;EACpB;EAEQwD,WAAWA,CAAA,EAAS;IAC1B,IAAI,CAAC9C,UAAU,GAAG,CAAC;IACnB,IAAI,CAACA,UAAU,GAAG,IAAI;EACxB;EAEQqD,IAAIA,CAACsB,KAAyB,EAAQ;IAC5C,KAAK,MAAMjD,QAAQ,IAAI,IAAI,CAAChC,SAAS,EAAE;MACrC,IAAI;QACFgC,QAAQ,CAACiD,KAAK,CAAC;MACjB,CAAC,CAAC,MAAM;QACN;MAAA;IAEJ;EACF;AACF;AAEA,SAAS1C,aAAaA,CAACF,KAAc,EAAU;EAC7C,IAAIA,KAAK,YAAY6C,KAAK,EAAE,OAAO7C,KAAK,CAAC6B,OAAO;EAChD,IAAI,OAAO7B,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAC3C,OAAO8C,MAAM,CAAC9C,KAAK,CAAC;AACtB","ignoreList":[]}
|
|
@@ -1,64 +1,221 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { ChromeBarTransition, useChromeBarMounted } from "../authoring/chrome/ChromeBarTransition.js";
|
|
6
|
+
import { ChromeButton } from "../authoring/chrome/ChromeButton.js";
|
|
7
|
+
import { ChromeDialog } from "../authoring/chrome/ChromeDialog.js";
|
|
8
|
+
import { ChromeTooltip } from "../authoring/chrome/ChromeTooltip.js";
|
|
9
|
+
import { ChromeTopBar } from "../authoring/chrome/ChromeTopBar.js";
|
|
10
|
+
import { doubleTapMonitor } from "../authoring/chrome/doubleTapMonitor.js";
|
|
11
|
+
import { useReportPreviewBannerHeight } from "../surfaces/surfaceLayoutInsets.js";
|
|
12
|
+
import { resolvePreviewChrome } from "./resolvePreviewChrome.js";
|
|
5
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
const ONBOARDING_COPY = 'Double tap anywhere to access the menu';
|
|
6
15
|
/**
|
|
7
16
|
* Overlay chrome for Builder pairing preview mode.
|
|
8
17
|
*/
|
|
9
18
|
export function PreviewModeBanner({
|
|
10
19
|
state,
|
|
11
|
-
onExit
|
|
20
|
+
onExit,
|
|
21
|
+
onRestart,
|
|
22
|
+
onConfirmingChange,
|
|
23
|
+
suppressed = false
|
|
12
24
|
}) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
25
|
+
const setBannerHeight = useReportPreviewBannerHeight();
|
|
26
|
+
const chrome = resolvePreviewChrome(state);
|
|
27
|
+
const [chromeShown, setChromeShown] = React.useState(true);
|
|
28
|
+
const [showOnboarding, setShowOnboarding] = React.useState(false);
|
|
29
|
+
const [barHeight, setBarHeight] = React.useState(0);
|
|
30
|
+
const sessionArmedRef = React.useRef(false);
|
|
31
|
+
const isError = chrome.visible && chrome.tone === 'error';
|
|
32
|
+
const visible = chrome.visible && !suppressed && (chromeShown || isError);
|
|
33
|
+
const [confirming, setConfirming] = React.useState(null);
|
|
34
|
+
const showRestart = Boolean(state.canRestartPreview) && !isError;
|
|
35
|
+
const showDialog = confirming != null && visible && !isError;
|
|
36
|
+
// Keep the bar mounted through its slide-out (double-tap hide, preview end,
|
|
37
|
+
// or picker suppression), rendering the last known chrome while it leaves.
|
|
38
|
+
const barMounted = useChromeBarMounted(visible);
|
|
39
|
+
const lastVisibleChromeRef = React.useRef(null);
|
|
40
|
+
if (chrome.visible) {
|
|
41
|
+
lastVisibleChromeRef.current = chrome;
|
|
16
42
|
}
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
43
|
+
const barChrome = chrome.visible ? chrome : lastVisibleChromeRef.current;
|
|
44
|
+
React.useEffect(() => {
|
|
45
|
+
if (!chrome.visible) {
|
|
46
|
+
sessionArmedRef.current = false;
|
|
47
|
+
setChromeShown(true);
|
|
48
|
+
setShowOnboarding(false);
|
|
49
|
+
setBarHeight(0);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (isError) {
|
|
53
|
+
setChromeShown(true);
|
|
54
|
+
setShowOnboarding(false);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (!sessionArmedRef.current) {
|
|
58
|
+
sessionArmedRef.current = true;
|
|
59
|
+
setShowOnboarding(true);
|
|
60
|
+
}
|
|
61
|
+
}, [chrome.visible, isError]);
|
|
62
|
+
React.useEffect(() => {
|
|
63
|
+
if (!visible || isError) {
|
|
64
|
+
setConfirming(null);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (confirming === 'restart' && !state.canRestartPreview) {
|
|
68
|
+
setConfirming(null);
|
|
69
|
+
}
|
|
70
|
+
}, [confirming, isError, state.canRestartPreview, visible]);
|
|
71
|
+
React.useEffect(() => {
|
|
72
|
+
if (!chrome.visible) {
|
|
73
|
+
setBannerHeight(0);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (suppressed) return;
|
|
77
|
+
if (!chromeShown && !isError) {
|
|
78
|
+
setBannerHeight(0);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (barHeight > 0) {
|
|
82
|
+
setBannerHeight(barHeight);
|
|
83
|
+
}
|
|
84
|
+
}, [barHeight, chrome.visible, chromeShown, isError, setBannerHeight, suppressed]);
|
|
85
|
+
React.useEffect(() => {
|
|
86
|
+
if (!chrome.visible || suppressed || isError) {
|
|
87
|
+
doubleTapMonitor.set(null);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
doubleTapMonitor.set({
|
|
91
|
+
onDoubleTap: () => {
|
|
92
|
+
setShowOnboarding(false);
|
|
93
|
+
setChromeShown(shown => !shown);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
return () => {
|
|
97
|
+
doubleTapMonitor.set(null);
|
|
98
|
+
};
|
|
99
|
+
}, [chrome.visible, isError, suppressed]);
|
|
100
|
+
React.useEffect(() => {
|
|
101
|
+
onConfirmingChange?.(showDialog);
|
|
102
|
+
}, [showDialog, onConfirmingChange]);
|
|
103
|
+
React.useEffect(() => {
|
|
104
|
+
return () => {
|
|
105
|
+
onConfirmingChange?.(false);
|
|
106
|
+
};
|
|
107
|
+
}, [onConfirmingChange]);
|
|
108
|
+
const onMeasureHeight = React.useCallback(height => {
|
|
109
|
+
setBarHeight(Math.max(0, height));
|
|
110
|
+
}, []);
|
|
111
|
+
const onLeftPress = React.useCallback(() => {
|
|
112
|
+
if (isError) {
|
|
113
|
+
onExit();
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
setConfirming('exit');
|
|
117
|
+
}, [isError, onExit]);
|
|
118
|
+
const onRightPress = React.useCallback(() => {
|
|
119
|
+
if (isError || !state.canRestartPreview) return;
|
|
120
|
+
setConfirming('restart');
|
|
121
|
+
}, [isError, state.canRestartPreview]);
|
|
122
|
+
const closeDialog = React.useCallback(() => {
|
|
123
|
+
setConfirming(null);
|
|
124
|
+
}, []);
|
|
125
|
+
const confirmExit = React.useCallback(() => {
|
|
126
|
+
setConfirming(null);
|
|
127
|
+
onExit();
|
|
128
|
+
}, [onExit]);
|
|
129
|
+
const confirmRestart = React.useCallback(() => {
|
|
130
|
+
setConfirming(null);
|
|
131
|
+
onRestart?.();
|
|
132
|
+
}, [onRestart]);
|
|
133
|
+
if (!barMounted && !showDialog) return null;
|
|
134
|
+
const tooltipVisible = visible && showOnboarding && !isError && !showDialog;
|
|
135
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
136
|
+
accessibilityViewIsModal: showDialog,
|
|
29
137
|
pointerEvents: "box-none",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
138
|
+
style: [styles.wrap, showDialog ? styles.wrapConfirming : null],
|
|
139
|
+
testID: "userflow-preview-banner",
|
|
140
|
+
children: [showDialog && confirming === 'exit' ?
|
|
141
|
+
/*#__PURE__*/
|
|
142
|
+
// Dialog first so its scrim paints under the bar (Figma: Overlay then Button Sheet).
|
|
143
|
+
_jsxs(ChromeDialog, {
|
|
144
|
+
body: "You will need to pair your device again in Userflow to preview this flow.",
|
|
145
|
+
onClose: closeDialog,
|
|
146
|
+
title: "Exit preview mode?",
|
|
147
|
+
children: [/*#__PURE__*/_jsx(ChromeButton, {
|
|
148
|
+
accessibilityLabel: "Cancel",
|
|
149
|
+
flex: true,
|
|
150
|
+
label: "Cancel",
|
|
151
|
+
onPress: closeDialog,
|
|
152
|
+
testID: "userflow-preview-exit-cancel",
|
|
153
|
+
variant: "secondary"
|
|
154
|
+
}), /*#__PURE__*/_jsx(ChromeButton, {
|
|
44
155
|
accessibilityLabel: "Exit preview",
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
})
|
|
51
|
-
}) : /*#__PURE__*/_jsx(Pressable, {
|
|
52
|
-
accessibilityRole: "button",
|
|
53
|
-
accessibilityLabel: "Dismiss pairing message",
|
|
54
|
-
onPress: onExit,
|
|
55
|
-
style: styles.button,
|
|
56
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
57
|
-
style: styles.buttonLabel,
|
|
58
|
-
children: "Dismiss"
|
|
59
|
-
})
|
|
156
|
+
flex: true,
|
|
157
|
+
icon: "arrow-left-from-bracket",
|
|
158
|
+
label: "Exit",
|
|
159
|
+
onPress: confirmExit,
|
|
160
|
+
testID: "userflow-preview-exit-confirm"
|
|
60
161
|
})]
|
|
61
|
-
})
|
|
162
|
+
}) : null, showDialog && confirming === 'restart' ? /*#__PURE__*/_jsxs(ChromeDialog, {
|
|
163
|
+
body: "This will restart the flow from the first step.",
|
|
164
|
+
onClose: closeDialog,
|
|
165
|
+
title: "Restart flow?",
|
|
166
|
+
children: [/*#__PURE__*/_jsx(ChromeButton, {
|
|
167
|
+
accessibilityLabel: "Cancel",
|
|
168
|
+
flex: true,
|
|
169
|
+
label: "Cancel",
|
|
170
|
+
onPress: closeDialog,
|
|
171
|
+
testID: "userflow-preview-restart-cancel",
|
|
172
|
+
variant: "secondary"
|
|
173
|
+
}), /*#__PURE__*/_jsx(ChromeButton, {
|
|
174
|
+
accessibilityLabel: "Restart flow",
|
|
175
|
+
flex: true,
|
|
176
|
+
icon: "arrow-rotate-left",
|
|
177
|
+
label: "Restart",
|
|
178
|
+
onPress: confirmRestart,
|
|
179
|
+
testID: "userflow-preview-restart-confirm"
|
|
180
|
+
})]
|
|
181
|
+
}) : null, barMounted && barChrome ? /*#__PURE__*/_jsx(ChromeBarTransition, {
|
|
182
|
+
edge: "top",
|
|
183
|
+
pointerEvents: "box-none",
|
|
184
|
+
visible: visible,
|
|
185
|
+
children: /*#__PURE__*/_jsx(ChromeTopBar, {
|
|
186
|
+
accessibilityElementsHidden: showDialog,
|
|
187
|
+
importantForAccessibility: showDialog ? 'no-hide-descendants' : undefined,
|
|
188
|
+
label: barChrome.label,
|
|
189
|
+
numberOfLines: barChrome.numberOfLines,
|
|
190
|
+
onMeasureHeight: onMeasureHeight,
|
|
191
|
+
tone: barChrome.tone,
|
|
192
|
+
left: /*#__PURE__*/_jsx(ChromeButton, {
|
|
193
|
+
accessibilityLabel: isError ? 'Dismiss pairing message' : 'Exit preview',
|
|
194
|
+
icon: "arrow-left-from-bracket",
|
|
195
|
+
onPress: onLeftPress,
|
|
196
|
+
testID: "userflow-preview-exit",
|
|
197
|
+
variant: "icon"
|
|
198
|
+
}),
|
|
199
|
+
right: showRestart ? /*#__PURE__*/_jsx(ChromeButton, {
|
|
200
|
+
accessibilityLabel: "Restart flow",
|
|
201
|
+
icon: "arrow-rotate-left",
|
|
202
|
+
onPress: onRightPress,
|
|
203
|
+
testID: "userflow-preview-restart",
|
|
204
|
+
variant: "icon"
|
|
205
|
+
}) : undefined
|
|
206
|
+
})
|
|
207
|
+
}) : null, tooltipVisible ? /*#__PURE__*/_jsx(View, {
|
|
208
|
+
pointerEvents: "none",
|
|
209
|
+
style: [styles.tooltip, {
|
|
210
|
+
top: barHeight
|
|
211
|
+
}],
|
|
212
|
+
children: /*#__PURE__*/_jsx(ChromeTooltip, {
|
|
213
|
+
onDismiss: () => {
|
|
214
|
+
setShowOnboarding(false);
|
|
215
|
+
},
|
|
216
|
+
children: ONBOARDING_COPY
|
|
217
|
+
})
|
|
218
|
+
}) : null]
|
|
62
219
|
});
|
|
63
220
|
}
|
|
64
221
|
const styles = StyleSheet.create({
|
|
@@ -67,47 +224,17 @@ const styles = StyleSheet.create({
|
|
|
67
224
|
top: 0,
|
|
68
225
|
left: 0,
|
|
69
226
|
right: 0,
|
|
227
|
+
bottom: 0,
|
|
70
228
|
zIndex: 1000
|
|
71
229
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
marginHorizontal: 12,
|
|
75
|
-
borderRadius: 10,
|
|
76
|
-
paddingHorizontal: 12,
|
|
77
|
-
paddingVertical: 10,
|
|
78
|
-
flexDirection: 'row',
|
|
79
|
-
alignItems: 'center',
|
|
80
|
-
gap: 10
|
|
81
|
-
},
|
|
82
|
-
bannerActive: {
|
|
83
|
-
backgroundColor: 'rgba(17, 24, 39, 0.92)'
|
|
84
|
-
},
|
|
85
|
-
bannerWarn: {
|
|
86
|
-
backgroundColor: 'rgba(127, 29, 29, 0.94)'
|
|
87
|
-
},
|
|
88
|
-
textCol: {
|
|
89
|
-
flex: 1
|
|
90
|
-
},
|
|
91
|
-
title: {
|
|
92
|
-
color: '#ffffff',
|
|
93
|
-
fontSize: 13,
|
|
94
|
-
fontWeight: '700'
|
|
230
|
+
wrapConfirming: {
|
|
231
|
+
zIndex: 1200
|
|
95
232
|
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
button: {
|
|
102
|
-
paddingHorizontal: 10,
|
|
103
|
-
paddingVertical: 8,
|
|
104
|
-
borderRadius: 8,
|
|
105
|
-
backgroundColor: 'rgba(255,255,255,0.14)'
|
|
106
|
-
},
|
|
107
|
-
buttonLabel: {
|
|
108
|
-
color: '#ffffff',
|
|
109
|
-
fontSize: 12,
|
|
110
|
-
fontWeight: '600'
|
|
233
|
+
tooltip: {
|
|
234
|
+
position: 'absolute',
|
|
235
|
+
left: 0,
|
|
236
|
+
right: 0,
|
|
237
|
+
alignItems: 'center'
|
|
111
238
|
}
|
|
112
239
|
});
|
|
113
240
|
//# sourceMappingURL=PreviewModeBanner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","ChromeBarTransition","useChromeBarMounted","ChromeButton","ChromeDialog","ChromeTooltip","ChromeTopBar","doubleTapMonitor","useReportPreviewBannerHeight","resolvePreviewChrome","jsx","_jsx","jsxs","_jsxs","ONBOARDING_COPY","PreviewModeBanner","state","onExit","onRestart","onConfirmingChange","suppressed","setBannerHeight","chrome","chromeShown","setChromeShown","useState","showOnboarding","setShowOnboarding","barHeight","setBarHeight","sessionArmedRef","useRef","isError","visible","tone","confirming","setConfirming","showRestart","Boolean","canRestartPreview","showDialog","barMounted","lastVisibleChromeRef","current","barChrome","useEffect","set","onDoubleTap","shown","onMeasureHeight","useCallback","height","Math","max","onLeftPress","onRightPress","closeDialog","confirmExit","confirmRestart","tooltipVisible","accessibilityViewIsModal","pointerEvents","style","styles","wrap","wrapConfirming","testID","children","body","onClose","title","accessibilityLabel","flex","label","onPress","variant","icon","edge","accessibilityElementsHidden","importantForAccessibility","undefined","numberOfLines","left","right","tooltip","top","onDismiss","create","position","bottom","zIndex","alignItems"],"sourceRoot":"../../../src","sources":["pairing/PreviewModeBanner.tsx"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,mBAAmB,EAAEC,mBAAmB,QAAQ,4CAAyC;AAClG,SAASC,YAAY,QAAQ,qCAAkC;AAC/D,SAASC,YAAY,QAAQ,qCAAkC;AAC/D,SAASC,aAAa,QAAQ,sCAAmC;AACjE,SAASC,YAAY,QAAQ,qCAAkC;AAC/D,SAASC,gBAAgB,QAAQ,yCAAsC;AACvE,SAASC,4BAA4B,QAAQ,oCAAiC;AAE9E,SAASC,oBAAoB,QAA4B,2BAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAKlF,MAAMC,eAAe,GAAG,wCAAwC;AAYhE;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAC;EAChCC,KAAK;EACLC,MAAM;EACNC,SAAS;EACTC,kBAAkB;EAClBC,UAAU,GAAG;AACS,CAAC,EAA6B;EACpD,MAAMC,eAAe,GAAGb,4BAA4B,CAAC,CAAC;EACtD,MAAMc,MAAM,GAAGb,oBAAoB,CAACO,KAAK,CAAC;EAC1C,MAAM,CAACO,WAAW,EAAEC,cAAc,CAAC,GAAG1B,KAAK,CAAC2B,QAAQ,CAAC,IAAI,CAAC;EAC1D,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAG7B,KAAK,CAAC2B,QAAQ,CAAC,KAAK,CAAC;EACjE,MAAM,CAACG,SAAS,EAAEC,YAAY,CAAC,GAAG/B,KAAK,CAAC2B,QAAQ,CAAC,CAAC,CAAC;EACnD,MAAMK,eAAe,GAAGhC,KAAK,CAACiC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mB;UACxBF,OAAO,EAAEnB,YAAa;UACtBW,MAAM,EAAC,0BAA0B;UACjCS,OAAO,EAAC;QAAM,CACf,CAAC,GACAK;MACL,CACF;IAAC,CACiB,CAAC,GACpB,IAAI,EACPrB,cAAc,gBACbhD,IAAA,CAACX,IAAI;MAAC6D,aAAa,EAAC,MAAM;MAACC,KAAK,EAAE,CAACC,MAAM,CAACqB,OAAO,EAAE;QAAEC,GAAG,EAAEzD;MAAU,CAAC,CAAE;MAAAuC,QAAA,eACrExD,IAAA,CAACN,aAAa;QACZiF,SAAS,EAAEA,CAAA,KAAM;UACf3D,iBAAiB,CAAC,KAAK,CAAC;QAC1B,CAAE;QAAAwC,QAAA,EAEDrD;MAAe,CACH;IAAC,CACZ,CAAC,GACL,IAAI;EAAA,CACJ,CAAC;AAEX;AAEA,MAAMiD,MAAM,GAAGhE,UAAU,CAACwF,MAAM,CAAC;EAC/BvB,IAAI,EAAE;IACJwB,QAAQ,EAAE,UAAU;IACpBH,GAAG,EAAE,CAAC;IACNH,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRM,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE;EACV,CAAC;EACDzB,cAAc,EAAE;IACdyB,MAAM,EAAE;EACV,CAAC;EACDN,OAAO,EAAE;IACPI,QAAQ,EAAE,UAAU;IACpBN,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRQ,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -55,6 +55,14 @@ export function pairingConnectFailedMessage(reason) {
|
|
|
55
55
|
return `${PREFIX} Builder pairing could not connect: ${reason}. The app is unaffected — ` + `re-open the pairing link from the Builder to try again.`;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Engine-reported pairing failure (`lastError`). The preview top bar no longer
|
|
60
|
+
* has a second line for this, so it must reach Metro under the `[Userflow]` prefix.
|
|
61
|
+
*/
|
|
62
|
+
export function pairingPreviewErrorMessage(reason) {
|
|
63
|
+
return `${PREFIX} Builder pairing: ${reason}`;
|
|
64
|
+
}
|
|
65
|
+
|
|
58
66
|
/** A pairing link arrived without the `pairing_token` query parameter. */
|
|
59
67
|
export function pairingMissingTokenMessage(url) {
|
|
60
68
|
return `${PREFIX} Ignoring Builder pairing link "${redactPairingToken(url)}": no ` + `"pairing_token" query parameter. Open the link straight from the Builder QR ` + `code rather than reconstructing it by hand.`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PREFIX","redactPairingToken","url","replace","defaultPairingLogger","message","console","warn","pairingLinkDeferredMessage","pairingLinkInitFailedMessage","reason","pairingConnectFailedMessage","pairingMissingTokenMessage","pairingForeignSchemeMessage","pairingAttemptRejectionMessage","pairingSchemeShapeMessage","pairingTokenStoreClearFailedMessage","pairingListenerSetupFailedMessage"],"sourceRoot":"../../../src","sources":["pairing/diagnostics.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMA,MAAM,GAAG,YAAY;;AAE3B;AACA;AACA;AACA;AACA,SAASC,kBAAkBA,CAACC,GAAW,EAAU;EAC/C,OAAOA,GAAG,CAACC,OAAO,CAAC,wBAAwB,EAAE,cAAc,CAAC;AAC9D;;AAEA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAmC,GAAIC,OAAO,IAAK;EAC9D;EACAC,OAAO,CAACC,IAAI,CAACF,OAAO,CAAC;AACvB,CAAC;;AAED;AACA,OAAO,SAASG,0BAA0BA,CAAA,EAAW;EACnD,OACE,GAAGR,MAAM,kEAAkE,GAC3E,uDAAuD;AAE3D;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASS,4BAA4BA,CAACC,MAAc,EAAU;EACnE,OACE,GAAGV,MAAM,wEAAwE,GACjF,iBAAiBU,MAAM,2DAA2D,GAClF,mEAAmE;AAEvE;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,2BAA2BA,CAACD,MAAc,EAAU;EAClE,OACE,GAAGV,MAAM,uCAAuCU,MAAM,4BAA4B,GAClF,yDAAyD;AAE7D;;AAEA;AACA,OAAO,SAASE,0BAA0BA,
|
|
1
|
+
{"version":3,"names":["PREFIX","redactPairingToken","url","replace","defaultPairingLogger","message","console","warn","pairingLinkDeferredMessage","pairingLinkInitFailedMessage","reason","pairingConnectFailedMessage","pairingPreviewErrorMessage","pairingMissingTokenMessage","pairingForeignSchemeMessage","pairingAttemptRejectionMessage","pairingSchemeShapeMessage","pairingTokenStoreClearFailedMessage","pairingListenerSetupFailedMessage"],"sourceRoot":"../../../src","sources":["pairing/diagnostics.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMA,MAAM,GAAG,YAAY;;AAE3B;AACA;AACA;AACA;AACA,SAASC,kBAAkBA,CAACC,GAAW,EAAU;EAC/C,OAAOA,GAAG,CAACC,OAAO,CAAC,wBAAwB,EAAE,cAAc,CAAC;AAC9D;;AAEA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAmC,GAAIC,OAAO,IAAK;EAC9D;EACAC,OAAO,CAACC,IAAI,CAACF,OAAO,CAAC;AACvB,CAAC;;AAED;AACA,OAAO,SAASG,0BAA0BA,CAAA,EAAW;EACnD,OACE,GAAGR,MAAM,kEAAkE,GAC3E,uDAAuD;AAE3D;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASS,4BAA4BA,CAACC,MAAc,EAAU;EACnE,OACE,GAAGV,MAAM,wEAAwE,GACjF,iBAAiBU,MAAM,2DAA2D,GAClF,mEAAmE;AAEvE;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,2BAA2BA,CAACD,MAAc,EAAU;EAClE,OACE,GAAGV,MAAM,uCAAuCU,MAAM,4BAA4B,GAClF,yDAAyD;AAE7D;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASE,0BAA0BA,CAACF,MAAc,EA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