@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
|
@@ -6,64 +6,221 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.PreviewModeBanner = PreviewModeBanner;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _ChromeBarTransition = require("../authoring/chrome/ChromeBarTransition.js");
|
|
10
|
+
var _ChromeButton = require("../authoring/chrome/ChromeButton.js");
|
|
11
|
+
var _ChromeDialog = require("../authoring/chrome/ChromeDialog.js");
|
|
12
|
+
var _ChromeTooltip = require("../authoring/chrome/ChromeTooltip.js");
|
|
13
|
+
var _ChromeTopBar = require("../authoring/chrome/ChromeTopBar.js");
|
|
14
|
+
var _doubleTapMonitor = require("../authoring/chrome/doubleTapMonitor.js");
|
|
15
|
+
var _surfaceLayoutInsets = require("../surfaces/surfaceLayoutInsets.js");
|
|
16
|
+
var _resolvePreviewChrome = require("./resolvePreviewChrome.js");
|
|
9
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
19
|
+
const ONBOARDING_COPY = 'Double tap anywhere to access the menu';
|
|
11
20
|
/**
|
|
12
21
|
* Overlay chrome for Builder pairing preview mode.
|
|
13
22
|
*/
|
|
14
23
|
function PreviewModeBanner({
|
|
15
24
|
state,
|
|
16
|
-
onExit
|
|
25
|
+
onExit,
|
|
26
|
+
onRestart,
|
|
27
|
+
onConfirmingChange,
|
|
28
|
+
suppressed = false
|
|
17
29
|
}) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
const setBannerHeight = (0, _surfaceLayoutInsets.useReportPreviewBannerHeight)();
|
|
31
|
+
const chrome = (0, _resolvePreviewChrome.resolvePreviewChrome)(state);
|
|
32
|
+
const [chromeShown, setChromeShown] = React.useState(true);
|
|
33
|
+
const [showOnboarding, setShowOnboarding] = React.useState(false);
|
|
34
|
+
const [barHeight, setBarHeight] = React.useState(0);
|
|
35
|
+
const sessionArmedRef = React.useRef(false);
|
|
36
|
+
const isError = chrome.visible && chrome.tone === 'error';
|
|
37
|
+
const visible = chrome.visible && !suppressed && (chromeShown || isError);
|
|
38
|
+
const [confirming, setConfirming] = React.useState(null);
|
|
39
|
+
const showRestart = Boolean(state.canRestartPreview) && !isError;
|
|
40
|
+
const showDialog = confirming != null && visible && !isError;
|
|
41
|
+
// Keep the bar mounted through its slide-out (double-tap hide, preview end,
|
|
42
|
+
// or picker suppression), rendering the last known chrome while it leaves.
|
|
43
|
+
const barMounted = (0, _ChromeBarTransition.useChromeBarMounted)(visible);
|
|
44
|
+
const lastVisibleChromeRef = React.useRef(null);
|
|
45
|
+
if (chrome.visible) {
|
|
46
|
+
lastVisibleChromeRef.current = chrome;
|
|
21
47
|
}
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
48
|
+
const barChrome = chrome.visible ? chrome : lastVisibleChromeRef.current;
|
|
49
|
+
React.useEffect(() => {
|
|
50
|
+
if (!chrome.visible) {
|
|
51
|
+
sessionArmedRef.current = false;
|
|
52
|
+
setChromeShown(true);
|
|
53
|
+
setShowOnboarding(false);
|
|
54
|
+
setBarHeight(0);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (isError) {
|
|
58
|
+
setChromeShown(true);
|
|
59
|
+
setShowOnboarding(false);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!sessionArmedRef.current) {
|
|
63
|
+
sessionArmedRef.current = true;
|
|
64
|
+
setShowOnboarding(true);
|
|
65
|
+
}
|
|
66
|
+
}, [chrome.visible, isError]);
|
|
67
|
+
React.useEffect(() => {
|
|
68
|
+
if (!visible || isError) {
|
|
69
|
+
setConfirming(null);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (confirming === 'restart' && !state.canRestartPreview) {
|
|
73
|
+
setConfirming(null);
|
|
74
|
+
}
|
|
75
|
+
}, [confirming, isError, state.canRestartPreview, visible]);
|
|
76
|
+
React.useEffect(() => {
|
|
77
|
+
if (!chrome.visible) {
|
|
78
|
+
setBannerHeight(0);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (suppressed) return;
|
|
82
|
+
if (!chromeShown && !isError) {
|
|
83
|
+
setBannerHeight(0);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (barHeight > 0) {
|
|
87
|
+
setBannerHeight(barHeight);
|
|
88
|
+
}
|
|
89
|
+
}, [barHeight, chrome.visible, chromeShown, isError, setBannerHeight, suppressed]);
|
|
90
|
+
React.useEffect(() => {
|
|
91
|
+
if (!chrome.visible || suppressed || isError) {
|
|
92
|
+
_doubleTapMonitor.doubleTapMonitor.set(null);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
_doubleTapMonitor.doubleTapMonitor.set({
|
|
96
|
+
onDoubleTap: () => {
|
|
97
|
+
setShowOnboarding(false);
|
|
98
|
+
setChromeShown(shown => !shown);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
return () => {
|
|
102
|
+
_doubleTapMonitor.doubleTapMonitor.set(null);
|
|
103
|
+
};
|
|
104
|
+
}, [chrome.visible, isError, suppressed]);
|
|
105
|
+
React.useEffect(() => {
|
|
106
|
+
onConfirmingChange?.(showDialog);
|
|
107
|
+
}, [showDialog, onConfirmingChange]);
|
|
108
|
+
React.useEffect(() => {
|
|
109
|
+
return () => {
|
|
110
|
+
onConfirmingChange?.(false);
|
|
111
|
+
};
|
|
112
|
+
}, [onConfirmingChange]);
|
|
113
|
+
const onMeasureHeight = React.useCallback(height => {
|
|
114
|
+
setBarHeight(Math.max(0, height));
|
|
115
|
+
}, []);
|
|
116
|
+
const onLeftPress = React.useCallback(() => {
|
|
117
|
+
if (isError) {
|
|
118
|
+
onExit();
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
setConfirming('exit');
|
|
122
|
+
}, [isError, onExit]);
|
|
123
|
+
const onRightPress = React.useCallback(() => {
|
|
124
|
+
if (isError || !state.canRestartPreview) return;
|
|
125
|
+
setConfirming('restart');
|
|
126
|
+
}, [isError, state.canRestartPreview]);
|
|
127
|
+
const closeDialog = React.useCallback(() => {
|
|
128
|
+
setConfirming(null);
|
|
129
|
+
}, []);
|
|
130
|
+
const confirmExit = React.useCallback(() => {
|
|
131
|
+
setConfirming(null);
|
|
132
|
+
onExit();
|
|
133
|
+
}, [onExit]);
|
|
134
|
+
const confirmRestart = React.useCallback(() => {
|
|
135
|
+
setConfirming(null);
|
|
136
|
+
onRestart?.();
|
|
137
|
+
}, [onRestart]);
|
|
138
|
+
if (!barMounted && !showDialog) return null;
|
|
139
|
+
const tooltipVisible = visible && showOnboarding && !isError && !showDialog;
|
|
140
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
141
|
+
accessibilityViewIsModal: showDialog,
|
|
34
142
|
pointerEvents: "box-none",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
143
|
+
style: [styles.wrap, showDialog ? styles.wrapConfirming : null],
|
|
144
|
+
testID: "userflow-preview-banner",
|
|
145
|
+
children: [showDialog && confirming === 'exit' ?
|
|
146
|
+
/*#__PURE__*/
|
|
147
|
+
// Dialog first so its scrim paints under the bar (Figma: Overlay then Button Sheet).
|
|
148
|
+
(0, _jsxRuntime.jsxs)(_ChromeDialog.ChromeDialog, {
|
|
149
|
+
body: "You will need to pair your device again in Userflow to preview this flow.",
|
|
150
|
+
onClose: closeDialog,
|
|
151
|
+
title: "Exit preview mode?",
|
|
152
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeButton.ChromeButton, {
|
|
153
|
+
accessibilityLabel: "Cancel",
|
|
154
|
+
flex: true,
|
|
155
|
+
label: "Cancel",
|
|
156
|
+
onPress: closeDialog,
|
|
157
|
+
testID: "userflow-preview-exit-cancel",
|
|
158
|
+
variant: "secondary"
|
|
159
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeButton.ChromeButton, {
|
|
49
160
|
accessibilityLabel: "Exit preview",
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
})
|
|
56
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
57
|
-
accessibilityRole: "button",
|
|
58
|
-
accessibilityLabel: "Dismiss pairing message",
|
|
59
|
-
onPress: onExit,
|
|
60
|
-
style: styles.button,
|
|
61
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
62
|
-
style: styles.buttonLabel,
|
|
63
|
-
children: "Dismiss"
|
|
64
|
-
})
|
|
161
|
+
flex: true,
|
|
162
|
+
icon: "arrow-left-from-bracket",
|
|
163
|
+
label: "Exit",
|
|
164
|
+
onPress: confirmExit,
|
|
165
|
+
testID: "userflow-preview-exit-confirm"
|
|
65
166
|
})]
|
|
66
|
-
})
|
|
167
|
+
}) : null, showDialog && confirming === 'restart' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChromeDialog.ChromeDialog, {
|
|
168
|
+
body: "This will restart the flow from the first step.",
|
|
169
|
+
onClose: closeDialog,
|
|
170
|
+
title: "Restart flow?",
|
|
171
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeButton.ChromeButton, {
|
|
172
|
+
accessibilityLabel: "Cancel",
|
|
173
|
+
flex: true,
|
|
174
|
+
label: "Cancel",
|
|
175
|
+
onPress: closeDialog,
|
|
176
|
+
testID: "userflow-preview-restart-cancel",
|
|
177
|
+
variant: "secondary"
|
|
178
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeButton.ChromeButton, {
|
|
179
|
+
accessibilityLabel: "Restart flow",
|
|
180
|
+
flex: true,
|
|
181
|
+
icon: "arrow-rotate-left",
|
|
182
|
+
label: "Restart",
|
|
183
|
+
onPress: confirmRestart,
|
|
184
|
+
testID: "userflow-preview-restart-confirm"
|
|
185
|
+
})]
|
|
186
|
+
}) : null, barMounted && barChrome ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeBarTransition.ChromeBarTransition, {
|
|
187
|
+
edge: "top",
|
|
188
|
+
pointerEvents: "box-none",
|
|
189
|
+
visible: visible,
|
|
190
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeTopBar.ChromeTopBar, {
|
|
191
|
+
accessibilityElementsHidden: showDialog,
|
|
192
|
+
importantForAccessibility: showDialog ? 'no-hide-descendants' : undefined,
|
|
193
|
+
label: barChrome.label,
|
|
194
|
+
numberOfLines: barChrome.numberOfLines,
|
|
195
|
+
onMeasureHeight: onMeasureHeight,
|
|
196
|
+
tone: barChrome.tone,
|
|
197
|
+
left: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeButton.ChromeButton, {
|
|
198
|
+
accessibilityLabel: isError ? 'Dismiss pairing message' : 'Exit preview',
|
|
199
|
+
icon: "arrow-left-from-bracket",
|
|
200
|
+
onPress: onLeftPress,
|
|
201
|
+
testID: "userflow-preview-exit",
|
|
202
|
+
variant: "icon"
|
|
203
|
+
}),
|
|
204
|
+
right: showRestart ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeButton.ChromeButton, {
|
|
205
|
+
accessibilityLabel: "Restart flow",
|
|
206
|
+
icon: "arrow-rotate-left",
|
|
207
|
+
onPress: onRightPress,
|
|
208
|
+
testID: "userflow-preview-restart",
|
|
209
|
+
variant: "icon"
|
|
210
|
+
}) : undefined
|
|
211
|
+
})
|
|
212
|
+
}) : null, tooltipVisible ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
213
|
+
pointerEvents: "none",
|
|
214
|
+
style: [styles.tooltip, {
|
|
215
|
+
top: barHeight
|
|
216
|
+
}],
|
|
217
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeTooltip.ChromeTooltip, {
|
|
218
|
+
onDismiss: () => {
|
|
219
|
+
setShowOnboarding(false);
|
|
220
|
+
},
|
|
221
|
+
children: ONBOARDING_COPY
|
|
222
|
+
})
|
|
223
|
+
}) : null]
|
|
67
224
|
});
|
|
68
225
|
}
|
|
69
226
|
const styles = _reactNative.StyleSheet.create({
|
|
@@ -72,47 +229,17 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
72
229
|
top: 0,
|
|
73
230
|
left: 0,
|
|
74
231
|
right: 0,
|
|
232
|
+
bottom: 0,
|
|
75
233
|
zIndex: 1000
|
|
76
234
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
marginHorizontal: 12,
|
|
80
|
-
borderRadius: 10,
|
|
81
|
-
paddingHorizontal: 12,
|
|
82
|
-
paddingVertical: 10,
|
|
83
|
-
flexDirection: 'row',
|
|
84
|
-
alignItems: 'center',
|
|
85
|
-
gap: 10
|
|
86
|
-
},
|
|
87
|
-
bannerActive: {
|
|
88
|
-
backgroundColor: 'rgba(17, 24, 39, 0.92)'
|
|
89
|
-
},
|
|
90
|
-
bannerWarn: {
|
|
91
|
-
backgroundColor: 'rgba(127, 29, 29, 0.94)'
|
|
92
|
-
},
|
|
93
|
-
textCol: {
|
|
94
|
-
flex: 1
|
|
95
|
-
},
|
|
96
|
-
title: {
|
|
97
|
-
color: '#ffffff',
|
|
98
|
-
fontSize: 13,
|
|
99
|
-
fontWeight: '700'
|
|
235
|
+
wrapConfirming: {
|
|
236
|
+
zIndex: 1200
|
|
100
237
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
button: {
|
|
107
|
-
paddingHorizontal: 10,
|
|
108
|
-
paddingVertical: 8,
|
|
109
|
-
borderRadius: 8,
|
|
110
|
-
backgroundColor: 'rgba(255,255,255,0.14)'
|
|
111
|
-
},
|
|
112
|
-
buttonLabel: {
|
|
113
|
-
color: '#ffffff',
|
|
114
|
-
fontSize: 12,
|
|
115
|
-
fontWeight: '600'
|
|
238
|
+
tooltip: {
|
|
239
|
+
position: 'absolute',
|
|
240
|
+
left: 0,
|
|
241
|
+
right: 0,
|
|
242
|
+
alignItems: 'center'
|
|
116
243
|
}
|
|
117
244
|
});
|
|
118
245
|
//# sourceMappingURL=PreviewModeBanner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PreviewModeBanner","state","onExit","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_ChromeBarTransition","_ChromeButton","_ChromeDialog","_ChromeTooltip","_ChromeTopBar","_doubleTapMonitor","_surfaceLayoutInsets","_resolvePreviewChrome","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ONBOARDING_COPY","PreviewModeBanner","state","onExit","onRestart","onConfirmingChange","suppressed","setBannerHeight","useReportPreviewBannerHeight","chrome","resolvePreviewChrome","chromeShown","setChromeShown","useState","showOnboarding","setShowOnboarding","barHeight","setBarHeight","sessionArmedRef","useRef","isError","visible","tone","confirming","setConfirming","showRestart","Boolean","canRestartPreview","showDialog","barMounted","useChromeBarMounted","lastVisibleChromeRef","current","barChrome","useEffect","doubleTapMonitor","onDoubleTap","shown","onMeasureHeight","useCallback","height","Math","max","onLeftPress","onRightPress","closeDialog","confirmExit","confirmRestart","tooltipVisible","jsxs","View","accessibilityViewIsModal","pointerEvents","style","styles","wrap","wrapConfirming","testID","children","ChromeDialog","body","onClose","title","jsx","ChromeButton","accessibilityLabel","flex","label","onPress","variant","icon","ChromeBarTransition","edge","ChromeTopBar","accessibilityElementsHidden","importantForAccessibility","undefined","numberOfLines","left","right","tooltip","top","ChromeTooltip","onDismiss","StyleSheet","create","position","bottom","zIndex","alignItems"],"sourceRoot":"../../../src","sources":["pairing/PreviewModeBanner.tsx"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AACA,IAAAQ,oBAAA,GAAAR,OAAA;AAEA,IAAAS,qBAAA,GAAAT,OAAA;AAAkF,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAD,wBAAAY,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAd,uBAAA,YAAAA,CAAAY,CAA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,EAAE,UAAU;IACpBL,GAAG,EAAE,CAAC;IACNH,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRQ,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE;EACV,CAAC;EACDhC,cAAc,EAAE;IACdgC,MAAM,EAAE;EACV,CAAC;EACDR,OAAO,EAAE;IACPM,QAAQ,EAAE,UAAU;IACpBR,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRU,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@ exports.pairingLinkDeferredMessage = pairingLinkDeferredMessage;
|
|
|
11
11
|
exports.pairingLinkInitFailedMessage = pairingLinkInitFailedMessage;
|
|
12
12
|
exports.pairingListenerSetupFailedMessage = pairingListenerSetupFailedMessage;
|
|
13
13
|
exports.pairingMissingTokenMessage = pairingMissingTokenMessage;
|
|
14
|
+
exports.pairingPreviewErrorMessage = pairingPreviewErrorMessage;
|
|
14
15
|
exports.pairingSchemeShapeMessage = pairingSchemeShapeMessage;
|
|
15
16
|
exports.pairingTokenStoreClearFailedMessage = pairingTokenStoreClearFailedMessage;
|
|
16
17
|
/**
|
|
@@ -69,6 +70,14 @@ function pairingConnectFailedMessage(reason) {
|
|
|
69
70
|
return `${PREFIX} Builder pairing could not connect: ${reason}. The app is unaffected — ` + `re-open the pairing link from the Builder to try again.`;
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
/**
|
|
74
|
+
* Engine-reported pairing failure (`lastError`). The preview top bar no longer
|
|
75
|
+
* has a second line for this, so it must reach Metro under the `[Userflow]` prefix.
|
|
76
|
+
*/
|
|
77
|
+
function pairingPreviewErrorMessage(reason) {
|
|
78
|
+
return `${PREFIX} Builder pairing: ${reason}`;
|
|
79
|
+
}
|
|
80
|
+
|
|
72
81
|
/** A pairing link arrived without the `pairing_token` query parameter. */
|
|
73
82
|
function pairingMissingTokenMessage(url) {
|
|
74
83
|
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","exports","pairingLinkDeferredMessage","pairingLinkInitFailedMessage","reason","pairingConnectFailedMessage","pairingMissingTokenMessage","pairingForeignSchemeMessage","pairingAttemptRejectionMessage","pairingSchemeShapeMessage","pairingTokenStoreClearFailedMessage","pairingListenerSetupFailedMessage"],"sourceRoot":"../../../src","sources":["pairing/diagnostics.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["PREFIX","redactPairingToken","url","replace","defaultPairingLogger","message","console","warn","exports","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;AACO,MAAMC,oBAAmC,GAAIC,OAAO,IAAK;EAC9D;EACAC,OAAO,CAACC,IAAI,CAACF,OAAO,CAAC;AACvB,CAAC;;AAED;AAAAG,OAAA,CAAAJ,oBAAA,GAAAA,oBAAA;AACO,SAASK,0BAA0BA,CAAA,EAAW;EACnD,OACE,GAAGT,MAAM,kEAAkE,GAC3E,uDAAuD;AAE3D;;AAEA;AACA;AACA;AACA;AACO,SAASU,4BAA4B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A;AACA;AACA;AACA;AACO,SAASM,yBAAyBA,CAACf,GAAW,EAAU;EAC7D,OACE,GAAGF,MAAM,mCAAmCC,kBAAkB,CAACC,GAAG,CAAC,6BAA6B,GAChG,mFAAmF,GACnF,sEAAsE;AAE1E","ignoreList":[]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.bindElementPickerRelay = bindElementPickerRelay;
|
|
7
|
+
var _core = require("@userflow-tech/core");
|
|
8
|
+
var _elementPickerController = require("../authoring/elementPickerController.js");
|
|
9
|
+
function asRecord(payload) {
|
|
10
|
+
return payload && typeof payload === 'object' ? payload : {};
|
|
11
|
+
}
|
|
12
|
+
function idempotencyKeyOf(payload) {
|
|
13
|
+
const key = asRecord(payload)['idempotency_key'];
|
|
14
|
+
return typeof key === 'string' && key.length > 0 ? key : null;
|
|
15
|
+
}
|
|
16
|
+
function resultPayload(key, result) {
|
|
17
|
+
return {
|
|
18
|
+
idempotency_key: key,
|
|
19
|
+
ok: true,
|
|
20
|
+
autoData: result.autoData,
|
|
21
|
+
text: result.text ?? null,
|
|
22
|
+
...(result.screenshot ? {
|
|
23
|
+
screenshot: {
|
|
24
|
+
dataUrl: result.screenshot.dataUrl,
|
|
25
|
+
width: result.screenshot.width,
|
|
26
|
+
height: result.screenshot.height,
|
|
27
|
+
targetX1: result.screenshot.targetX1,
|
|
28
|
+
targetY1: result.screenshot.targetY1,
|
|
29
|
+
targetX2: result.screenshot.targetX2,
|
|
30
|
+
targetY2: result.screenshot.targetY2
|
|
31
|
+
}
|
|
32
|
+
} : {})
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Bridge pairing-channel `selectElement*` events onto {@link elementPickerController}.
|
|
38
|
+
* UI-free: the overlay (and QA harness) own the actual picking.
|
|
39
|
+
*/
|
|
40
|
+
function bindElementPickerRelay(engine) {
|
|
41
|
+
if (typeof engine.onRelay !== 'function' || typeof engine.sendRelay !== 'function') {
|
|
42
|
+
return () => undefined;
|
|
43
|
+
}
|
|
44
|
+
let ignoreNextCancelSend = false;
|
|
45
|
+
|
|
46
|
+
/** Result delivery: ignore ack timeouts; surface connection failures. */
|
|
47
|
+
const sendResult = async (key, result) => {
|
|
48
|
+
try {
|
|
49
|
+
await engine.sendRelay('selectElementResult', resultPayload(key, result));
|
|
50
|
+
} catch (error) {
|
|
51
|
+
if (typeof _core.isPairingPushAckTimeout === 'function' && (0, _core.isPairingPushAckTimeout)(error)) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** Cancel is best-effort: ignore timeout and disconnect. */
|
|
59
|
+
const sendCancel = key => {
|
|
60
|
+
void engine.sendRelay('selectElementCancel', {
|
|
61
|
+
idempotency_key: key
|
|
62
|
+
}).catch(() => undefined);
|
|
63
|
+
};
|
|
64
|
+
const unsub = engine.onRelay((event, payload) => {
|
|
65
|
+
if (event === 'selectElement') {
|
|
66
|
+
const key = idempotencyKeyOf(payload);
|
|
67
|
+
if (!key) return;
|
|
68
|
+
_elementPickerController.elementPickerController.beginSelection({
|
|
69
|
+
requestId: key,
|
|
70
|
+
onResult: result => sendResult(key, result),
|
|
71
|
+
onCancel: () => {
|
|
72
|
+
if (ignoreNextCancelSend) return;
|
|
73
|
+
sendCancel(key);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (event === 'selectElementCancel') {
|
|
79
|
+
ignoreNextCancelSend = true;
|
|
80
|
+
_elementPickerController.elementPickerController.cancel();
|
|
81
|
+
ignoreNextCancelSend = false;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
return () => {
|
|
85
|
+
unsub();
|
|
86
|
+
ignoreNextCancelSend = true;
|
|
87
|
+
_elementPickerController.elementPickerController.cancel();
|
|
88
|
+
ignoreNextCancelSend = false;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=elementPickerRelay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_elementPickerController","asRecord","payload","idempotencyKeyOf","key","length","resultPayload","result","idempotency_key","ok","autoData","text","screenshot","dataUrl","width","height","targetX1","targetY1","targetX2","targetY2","bindElementPickerRelay","engine","onRelay","sendRelay","undefined","ignoreNextCancelSend","sendResult","error","isPairingPushAckTimeout","sendCancel","catch","unsub","event","elementPickerController","beginSelection","requestId","onResult","onCancel","cancel"],"sourceRoot":"../../../src","sources":["pairing/elementPickerRelay.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,wBAAA,GAAAD,OAAA;AAUA,SAASE,QAAQA,CAACC,OAAgB,EAA2B;EAC3D,OAAOA,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,GAAIA,OAAO,GAA+B,CAAC,CAAC;AAC3F;AAEA,SAASC,gBAAgBA,CAACD,OAAgB,EAAiB;EACzD,MAAME,GAAG,GAAGH,QAAQ,CAACC,OAAO,CAAC,CAAC,iBAAiB,CAAC;EAChD,OAAO,OAAOE,GAAG,KAAK,QAAQ,IAAIA,GAAG,CAACC,MAAM,GAAG,CAAC,GAAGD,GAAG,GAAG,IAAI;AAC/D;AAEA,SAASE,aAAaA,CAACF,GAAW,EAAEG,MAA2B,EAA2B;EACxF,OAAO;IACLC,eAAe,EAAEJ,GAAG;IACpBK,EAAE,EAAE,IAAI;IACRC,QAAQ,EAAEH,MAAM,CAACG,QAAQ;IACzBC,IAAI,EAAEJ,MAAM,CAACI,IAAI,IAAI,IAAI;IACzB,IAAIJ,MAAM,CAACK,UAAU,GACjB;MACEA,UAAU,EAAE;QACVC,OAAO,EAAEN,MAAM,CAACK,UAAU,CAACC,OAAO;QAClCC,KAAK,EAAEP,MAA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B,GAAG,GAAGD,gBAAgB,CAACD,OAAO,CAAC;MACrC,IAAI,CAACE,GAAG,EAAE;MACV6B,gDAAuB,CAACC,cAAc,CAAC;QACrCC,SAAS,EAAE/B,GAAG;QACdgC,QAAQ,EAAG7B,MAAM,IAAKmB,UAAU,CAACtB,GAAG,EAAEG,MAAM,CAAC;QAC7C8B,QAAQ,EAAEA,CAAA,KAAM;UACd,IAAIZ,oBAAoB,EAAE;UAC1BI,UAAU,CAACzB,GAAG,CAAC;QACjB;MACF,CAAC,CAAC;MACF;IACF;IAEA,IAAI4B,KAAK,KAAK,qBAAqB,EAAE;MACnCP,oBAAoB,GAAG,IAAI;MAC3BQ,gDAAuB,CAACK,MAAM,CAAC,CAAC;MAChCb,oBAAoB,GAAG,KAAK;IAC9B;EACF,CAAC,CAAC;EAEF,OAAO,MAAM;IACXM,KAAK,CAAC,CAAC;IACPN,oBAAoB,GAAG,IAAI;IAC3BQ,gDAAuB,CAACK,MAAM,CAAC,CAAC;IAChCb,oBAAoB,GAAG,KAAK;EAC9B,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resolvePreviewChrome = resolvePreviewChrome;
|
|
7
|
+
function isBannerVisible(state) {
|
|
8
|
+
if (!state.previewActive && state.status === 'idle') return false;
|
|
9
|
+
if (!state.previewActive && state.status !== 'token_expired' && state.status !== 'device_already_paired' && state.status !== 'error') {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
function shown(tone, label, numberOfLines = 1) {
|
|
15
|
+
return {
|
|
16
|
+
visible: true,
|
|
17
|
+
tone,
|
|
18
|
+
label,
|
|
19
|
+
numberOfLines
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Maps pairing-engine state onto the preview top-bar chrome.
|
|
25
|
+
* Pure: no React, so the nine-case table can be asserted without a renderer.
|
|
26
|
+
*/
|
|
27
|
+
function resolvePreviewChrome(state) {
|
|
28
|
+
if (!isBannerVisible(state)) return {
|
|
29
|
+
visible: false
|
|
30
|
+
};
|
|
31
|
+
switch (state.status) {
|
|
32
|
+
case 'connecting':
|
|
33
|
+
return shown('default', 'Connecting to Builder…');
|
|
34
|
+
case 'reconnecting':
|
|
35
|
+
return shown('default', 'Reconnecting…');
|
|
36
|
+
case 'token_expired':
|
|
37
|
+
return shown('error', 'Pairing ended - rescan to continue', 2);
|
|
38
|
+
case 'device_already_paired':
|
|
39
|
+
return shown('error', 'Another device is already paired', 2);
|
|
40
|
+
case 'error':
|
|
41
|
+
if (state.pairingId === null) {
|
|
42
|
+
return shown('error', 'Preview unavailable');
|
|
43
|
+
}
|
|
44
|
+
return shown('error', 'Pairing ended - rescan to continue', 2);
|
|
45
|
+
default:
|
|
46
|
+
if (state.awaitingStartCondition) {
|
|
47
|
+
return shown('default', 'Waiting for auto-start condition…');
|
|
48
|
+
}
|
|
49
|
+
return shown('default', 'Preview mode');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=resolvePreviewChrome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isBannerVisible","state","previewActive","status","shown","tone","label","numberOfLines","visible","resolvePreviewChrome","pairingId","awaitingStartCondition"],"sourceRoot":"../../../src","sources":["pairing/resolvePreviewChrome.ts"],"mappings":";;;;;;AAQA,SAASA,eAAeA,CAACC,KAAyB,EAAW;EAC3D,IAAI,CAACA,KAAK,CAACC,aAAa,IAAID,KAAK,CAACE,MAAM,KAAK,MAAM,EAAE,OAAO,KAAK;EACjE,IACE,CAACF,KAAK,CAACC,aAAa,IACpBD,KAAK,CAACE,MAAM,KAAK,eAAe,IAChCF,KAAK,CAACE,MAAM,KAAK,uBAAuB,IACxCF,KAAK,CAACE,MAAM,KAAK,OAAO,EACxB;IACA,OAAO,KAAK;EACd;EACA,OAAO,IAAI;AACb;AAEA,SAASC,KAAKA,CACZC,IAAsB,EACtBC,KAAa,EACbC,aAAa,GAAG,CAAC,EAC0B;EAC3C,OAAO;IAAEC,OAAO,EAAE,IAAI;IAAEH,IAAI;IAAEC,KAAK;IAAEC;EAAc,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACO,SAASE,oBAAoBA,CAACR,KAAyB,EAAiB;EAC7E,IAAI,CAACD,eAAe,CAACC,KAAK,CAAC,EAAE,OAAO;IAAEO,OAAO,EAAE;EAAM,CAAC;EAEtD,QAAQP,KAAK,CAACE,MAAM;IAClB,KAAK,YAAY;MACf,OAAOC,KAAK,CAAC,SAAS,EAAE,wBAAwB,CAAC;IACnD,KAAK,cAAc;MACjB,OAAOA,KAAK,CAAC,SAAS,EAAE,eAAe,CAAC;IAC1C,KAAK,eAAe;MAClB,OAAOA,KAAK,CAAC,OAAO,EAAE,oCAAoC,EAAE,CAAC,CAAC;IAChE,KAAK,uBAAuB;MAC1B,OAAOA,KAAK,CAAC,OAAO,EAAE,kCAAkC,EAAE,CAAC,CAAC;IAC9D,KAAK,OAAO;MACV,IAAIH,KAAK,CAACS,SAAS,KAAK,IAAI,EAAE;QAC5B,OAAON,KAAK,CAAC,OAAO,EAAE,qBAAqB,CAAC;MAC9C;MACA,OAAOA,KAAK,CAAC,OAAO,EAAE,oCAAoC,EAAE,CAAC,CAAC;IAChE;MACE,IAAIH,KAAK,CAACU,sBAAsB,EAAE;QAChC,OAAOP,KAAK,CAAC,SAAS,EAAE,mCAAmC,CAAC;MAC9D;MACA,OAAOA,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC;EAC3C;AACF","ignoreList":[]}
|
|
@@ -5,20 +5,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createMemoryPairingTokenStore = createMemoryPairingTokenStore;
|
|
7
7
|
exports.createPairingTokenStore = createPairingTokenStore;
|
|
8
|
+
exports.resetPairingTokenStoreCacheForTests = resetPairingTokenStoreCacheForTests;
|
|
8
9
|
/**
|
|
9
10
|
* Persist the pairing JWT for reconnect within the current app session.
|
|
10
11
|
* Cleared on SDK init / exit preview / app restart (pairing exits on restart).
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
14
|
const STORAGE_KEY = 'userflow:pairingToken';
|
|
15
|
+
let cachedSecureStore;
|
|
16
|
+
|
|
17
|
+
/** Expo modules must be installed natively — not just the JS package. */
|
|
18
|
+
function isExpoModulesRuntimeAvailable() {
|
|
19
|
+
const expo = globalThis.expo;
|
|
20
|
+
return typeof expo?.EventEmitter === 'function';
|
|
21
|
+
}
|
|
14
22
|
function tryLoadExpoSecureStore() {
|
|
23
|
+
if (cachedSecureStore !== undefined) return cachedSecureStore;
|
|
24
|
+
if (typeof require !== 'function' || !isExpoModulesRuntimeAvailable()) {
|
|
25
|
+
cachedSecureStore = null;
|
|
26
|
+
return cachedSecureStore;
|
|
27
|
+
}
|
|
15
28
|
try {
|
|
16
29
|
// Optional peer — absent in bare RN without expo-secure-store.
|
|
17
30
|
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -- optional peer at import time
|
|
18
|
-
|
|
31
|
+
cachedSecureStore = require('expo-secure-store');
|
|
19
32
|
} catch {
|
|
20
|
-
|
|
33
|
+
cachedSecureStore = null;
|
|
34
|
+
if (__DEV__) {
|
|
35
|
+
// eslint-disable-next-line no-console -- intentional missing-optional-peer diagnostic
|
|
36
|
+
console.warn('[Userflow] Optional peer expo-secure-store is unavailable; ' + 'pairing JWT persistence falls back to in-memory storage.');
|
|
37
|
+
}
|
|
21
38
|
}
|
|
39
|
+
return cachedSecureStore;
|
|
22
40
|
}
|
|
23
41
|
|
|
24
42
|
/** In-memory store used when SecureStore is unavailable (and in tests). */
|
|
@@ -67,4 +85,9 @@ function createPairingTokenStore() {
|
|
|
67
85
|
}
|
|
68
86
|
};
|
|
69
87
|
}
|
|
88
|
+
|
|
89
|
+
/** @internal Resets module cache between tests. */
|
|
90
|
+
function resetPairingTokenStoreCacheForTests() {
|
|
91
|
+
cachedSecureStore = undefined;
|
|
92
|
+
}
|
|
70
93
|
//# sourceMappingURL=tokenStorage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["STORAGE_KEY","tryLoadExpoSecureStore","require","createMemoryPairingTokenStore","value","get","set","token","clear","createPairingTokenStore","secure","getItemAsync","setItemAsync","deleteItemAsync"],"sourceRoot":"../../../src","sources":["pairing/tokenStorage.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["STORAGE_KEY","cachedSecureStore","isExpoModulesRuntimeAvailable","expo","globalThis","EventEmitter","tryLoadExpoSecureStore","undefined","require","__DEV__","console","warn","createMemoryPairingTokenStore","value","get","set","token","clear","createPairingTokenStore","secure","getItemAsync","setItemAsync","deleteItemAsync","resetPairingTokenStoreCacheForTests"],"sourceRoot":"../../../src","sources":["pairing/tokenStorage.ts"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;;AAEA,MAAMA,WAAW,GAAG,uBAAuB;AAc3C,IAAIC,iBAAuD;;AAE3D;AACA,SAASC,6BAA6BA,CAAA,EAAY;EAChD,MAAMC,IAAI,GAAIC,UAAU,CAA2CD,IAAI;EACvE,OAAO,OAAOA,IAAI,EAAEE,YAAY,KAAK,UAAU;AACjD;AAEA,SAASC,sBAAsBA,CAAA,EAA6B;EAC1D,IAAIL,iBAAiB,KAAKM,SAAS,EAAE,OAAON,iBAAiB;EAE7D,IAAI,OAAOO,OAAO,KAAK,UAAU,IAAI,CAACN,6BAA6B,CAAC,CAAC,EAAE;IACrED,iBAAiB,GAAG,IAAI;IACxB,OAAOA,iBAAiB;EAC1B;EAEA,IAAI;IACF;IACA;IACAA,iBAAiB,GAAGO,OAAO,CAAC,mBAAmB,CAAsB;EACvE,CAAC,CAAC,MAAM;IACNP,iBAAiB,GAAG,IAAI;IACxB,IAAIQ,OAAO,EAAE;M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